Jump to content

Send text to email?


Guest Beefteck
 Share

Recommended Posts

Guest Beefteck

(not to much to say really...)

Basically I need a script that will send text entered in a text(input) box to my email (gmail) WHEN a button is pressed.

Thankyou for reading, :P

EDIT1:

OK THANK-YOU SO MUCH!!! I GOT IT TO WORK!!!

but, how would i make the text body be from text inputed into a text input box??? I am not to good with variables... here is the script that i would like to work with, thanks again.

CODE
#cs ----------------------------------------------------------------------------

AutoIt Version: 3.1.1.0

Author: myName

Script Function:

Template AutoIt script.

#ce ----------------------------------------------------------------------------

; Script Start - Add your code below here

$a = "smtp.gmail.com"

$b = "****@gmail.com"

$c = "***"

Emailx("****@gmail.com", "****@rcn.com", "Super Test", "THIS IS WHERE THE BODY TEXT GOES")

Func Emailx($d, $e, $f, $g)

$h = ObjCreate ("CDO.Message")

With $h

.Subject = $f

.Sender = $d

.From = $d

.To = $e

.TextBody = $g

;.AddAttachment ("C:\Documents and Settings\myname\Desktop\files\file.txt");needs full path- optional

EndWith

With $h.Configuration.Fields

.Item ("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2

.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserver") = $a

.Item ("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 465

.Item ("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate") = 1

.Item ("http://schemas.microsoft.com/cdo/configuration/sendusername") = $b

.Item ("http://schemas.microsoft.com/cdo/configuration/sendpassword") = $c

.Item ("http://schemas.microsoft.com/cdo/configuration/smtpconnectiontimeout") = 90

.Item ("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = True

.Update

EndWith

$h.Send

Return

EndFunc;==>Emailx

-Beefteck

-Beefteck

Edited by Beefteck
Link to comment
Share on other sites

  • Developers

-or- look at the original post in Examples: http://www.autoitscript.com/forum/index.ph...st&p=166575

It has the settings for GMail in the example ..

:P

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Guest Beefteck

any help with that??? tried out my own set with variables, but well... didnt work... code at top for what i want to use to send to email, thanks

-Beefteck

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...