Jump to content
Sign in to follow this  
Guest Beefteck

Send text to email?

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

Share this post


Link to post
Share on other sites
Jos

-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


Visit the SciTE4AutoIt3 Download page for the latest versions  - Beta files                                How to post scriptsource        Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites
Guest Beefteck

ok, when i get back to my house i will check them out. Thankyou

-Beefteck

Share this post


Link to post
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

Share this post


Link to post
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
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.