jay Posted October 8, 2005 Posted October 8, 2005 (edited) Does anyone have a script that will easily send a email to an address like hotmail.com from autoIT v3.0? Or a way to easily insert this into a script? I need really good instruction on how to set it up... I have search the forums for this but did not really see that much information on it. Thanks for any help Jay Edited October 8, 2005 by jay
Valuater Posted October 8, 2005 Posted October 8, 2005 this is not a support forum.... but if you search email you will find a few scripts here is onehttp://www.autoitscript.com/forum/index.ph...st=0&p=111220requires the beta... read all the posts8)
sksbir Posted October 10, 2005 Posted October 10, 2005 Does anyone have a script that will easily send a email to an address like hotmail.com from autoIT v3.0? Or a way to easily insert this into a script?I need really good instruction on how to set it up... I have search the forums for this but did not really see that much information on it.Thanks for any helpJayI suggest you to using blat , a Win32 command line utility that sends eMail using SMTP. I used it a long time before i used autoit, in cmd file...
jay Posted October 14, 2005 Author Posted October 14, 2005 I suggest you to using blat , a Win32 command line utility that sends eMail using SMTP. I used it a long time before i used autoit, in cmd file...Do you have a example of this
flyingboz Posted October 14, 2005 Posted October 14, 2005 Do you have a example of thisblat --help Reading the help file before you post... Not only will it make you look smarter, it will make you smarter.
jay Posted October 14, 2005 Author Posted October 14, 2005 blat --helpNo a Example of getting it to run in AutoIT
MSLx Fanboy Posted October 14, 2005 Posted October 14, 2005 its usually not that complicated. Form the commands needed to send your email, then just make a few Input boxes for the variables (such as the server, to, from, subject, message) or a GUI if you want it to look nice. Then, just do a run or runwait with the command, and voila. Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate())
jay Posted October 14, 2005 Author Posted October 14, 2005 its usually not that complicated. Form the commands needed to send your email, then just make a few Input boxes for the variables (such as the server, to, from, subject, message) or a GUI if you want it to look nice. Then, just do a run or runwait with the command, and voila.Here is my script how do i get blat.exe to read the variables in the script?; example 1#include <GUIConstants.au3>GUICreate("Email GUI App") ; will create a dialog box that when displayed is centered;INIREAD --------------------------------------------------- $Ini = "guiemail.ini" $SMTP = IniRead($Ini, "section1", "SMTP", "Not Found") $Ini = "guiemail.ini" $UNAME = IniRead($Ini, "section1", "USERNAME", "Not Found") $Ini = "guiemail.ini" $pword = IniRead($Ini, "section1", "PASSWORD", "Not Found") $Ini = "guiemail.ini" $TOWHO = IniRead($Ini, "section1", "TO", "Not Found") $Ini = "guiemail.ini" $FROMWHO = IniRead($Ini, "section1", "FROM", "Not Found") $Ini = "guiemail.ini" $SUBWHO = IniRead($Ini, "section1", "SUBJECT", "Not Found") $Ini = "guiemail.ini" $BODYWHO = IniRead($Ini, "section1", "BODY", "Not Found");INIREAD --------------------------------------------------- GUICtrlCreateLabel ("SMTP ADDRESS:", 2, 12, 100, 100, -1, -1) $SMTPADD = GUICtrlCreateInput($SMTP, 100, 10, 150, 20) GUICtrlCreateLabel ("USERNAME:", 2, 38, 100, 100, -1, -1) ;+26 $USERNAME = GUICtrlCreateInput ($UNAME, 100, 35, 150, 20) ;+25 GUICtrlCreateLabel ("PASSWORD:", 2, 64, 100, 100, -1, -1) $PASSWORD = GUICtrlCreateInput ($pword, 100, 60, 150, 20) GUICtrlCreateLabel ("TO:", 2, 90, 100, 100, -1, -1) $TO = GUICtrlCreateInput ($TOWHO, 100, 85, 150, 20) GUICtrlCreateLabel ("FROM:", 2, 116, 100, 100, -1, -1) $FROM = GUICtrlCreateInput ($FROMWHO, 100, 110, 150, 20) GUICtrlCreateLabel ("SUBJECT:", 2, 142, 100, 100, -1, -1) $SUBJECT = GUICtrlCreateInput ($SUBWHO, 100, 135, 150, 20) GUICtrlCreateLabel ("BODY:", 2, 168, 100, 100, -1, -1) $BODY = GUICtrlCreateInput ($BODYWHO, 100, 160, 150, 150, $ES_MULTILINE) $SEND = GUICtrlCreateButton ("SEND", 203, 325, 50, 20) $SAVE = GUICtrlCreateButton ("SAVE", 152, 325, 50, 20) $CLOSE = GUICtrlCreateButton ("CLOSE", 100, 325, 50, 20)GUISetState (@SW_SHOW) ; will display an empty dialog box; Run the GUI until the dialog is closedWhile 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop If $msg = $CLOSE Then ExitLoop If $msg = $SEND Then Run(Blat.exe ?????? If $msg = $SAVE Then ;INIWRITE --------------------------------------------------- IniWrite($Ini, "section1", "SMTP", GUICtrlRead($SMTPADD )) IniWrite($Ini, "section1", "USERNAME", GUICtrlRead($USERNAME)) IniWrite($Ini, "section1", "PASSWORD", GUICtrlRead($PASSWORD)) IniWrite($Ini, "section1", "TO", GUICtrlRead($TO)) IniWrite($Ini, "section1", "FROM", GUICtrlRead($FROM)) IniWrite($Ini, "section1", "SUBJECT", GUICtrlRead($SUBJECT)) IniWrite($Ini, "section1", "BODY", GUICtrlRead($BODY)) ;INIWRITE --------------------------------------------------- EndIfWend
Confuzzled Posted October 14, 2005 Posted October 14, 2005 As sksbir mentioned, blat is a command line utility, so you will have to read the blat help file and build your command line and pass it to blat accordingly.Good luck.
MSLx Fanboy Posted October 15, 2005 Posted October 15, 2005 In other words, Blat will not read the information from the GUI. You have to pass it to blat. You have the concept when you did GUICtrlRead() for the SAVE function. Just get the format for how you pass switches in blat (blat.exe /?), and just insert a GUICtrlRead($Variable) for each field... Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate())
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now