Sign in to follow this  
Followers 0
eitan

finaly email sending func with blat that workd !

2 posts in this topic

#1 ·  Posted (edited)

Func email()

$SMTPADD="your server address"

$SUBJECT="your subject"

$body="your message"

$TO="recipent email address"

$f="your email address"

$body=$stringwrite1

$log="log.txt"

Run("blat.exe -server """ & $SMTPADD & """ -s """ & $SUBJECT & """ -body """ & $BODY & """ -t """ & $TO & """ -f """ & $f & """ -log """& $log & """","" , @SW_HIDE )

endfunc

explanations

1) all the variables can accept other variables

2) to add username and password authentication add these 2 variables:

$USERNAME="put username here"

$PASSWORD="put password here"

and change the action line to this:

Run("blat.exe -server """ & $SMTPADD & """ -s """ & $SUBJECT & """ -body """ & $BODY & """ -u """ & $USERNAME & """ -pw """ & $PASSWORD & """ -t """ & $TO & """ -f """ & $f & """ -log """& $log & """","" , @SW_HIDE)

3) create a text file in the same directory called log.txt for logging or delete that part of the script if you dont want logging

4) the $body=$stringwrite1 variable is in case you want to transfer the message to the body variable using an input. if not...delete that line.

i have been playing with this for quite a while and scrounged the forums until i got it to work.

so enjoy

Edited by eitan

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

Does this work for you guys??

I couldn't get it to work with gmail, but couldn't find anything wrong in my script either, so maybe its just gmail...

Since its almost _perfect_ :) code i felt like posting it in the SnS forum^^

Hope you guys find something!

It's here: http://www.autoitscript.com/fileman/users/tdlrali/BlatMailer/

What you need to compile is the main script, the settings script and blat.exe!

BlatMailer is the compiled version, ELetters.ico is the icon and the 2 agd files are for the newest GUI Builder..

HF

Felix N. (tdlrali) :graduated:

Posted Image1

Hehe, by the way, you can store your settings, and the password is stored encripted! In the main.au3 you can change the line:

$enc_password = "BlatMailer"
to whatever you want! (I mean only the value, duh! B) )

That changes the the way your password is encripted, making it hard to recover the password from the ini file (its pretty safe already, but since everybody knows the password is encripted with the string "BlatMailer".... :o )

You get it? :D

Edited by Felix N.

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  
Followers 0