Clever1mba Posted July 2, 2005 Posted July 2, 2005 (edited) hello This code send email through telnet smtp port 25 it works fine but still need improvement like Tcprecv that receive all command currently receving and display gui #include <GUIConstants.au3>GUICreate("SMTP 25 1.1 by AsimZameer") GUICtrlCreateLabel ("Smtp :", 20, 10, 50) GUICtrlCreateLabel ("From :", 20, 40, 50) GUICtrlCreateLabel ("To :", 20, 70, 50) GUICtrlCreateLabel ("Name :", 20, 100, 50) GUICtrlCreateLabel ("Subject :", 20, 130, 50) GUICtrlCreateLabel ("Body :", 20, 160, 50) GUICtrlCreateLabel ("Status :", 5, 215, 50) $input1 = GUICtrlCreateInput("mx1.mail.yahoo.com",70,10,250,20)$input2 = GUICtrlCreateInput("snip",70,40,250,20)$input3 = GUICtrlCreateInput("snip",70,70,250,20)$input4 = GUICtrlCreateInput("asimzameer",70,100,250,20)$input5 = GUICtrlCreateInput("test message",70,130,250,20)$input6 = GUICtrlCreateInput("Hello WOW ASIM SMTP really Works",70,160,250,20)$myedit=GUICtrlCreateEdit ("Readme: After click on Send Button Wait Until status = 3 When Status = 3 it Means Email Successfully sent & Please Fill all Boxs Correctly If SMTP Address Not Works Automatically Exit and Close "& @CRLF, 1,230,400,70,$WS_DISABLED)$btn = GUICtrlCreateButton ("Send", 160, 310, 60, 20)GUISetState ()While 1$msg = GUIGetMsg()If $msg = $GUI_EVENT_CLOSE Then ExitLoopIf $msg = $btn Then$g_IP = GUICtrlRead($input1)$sData1 = "HELO " & GUICtrlRead($input4) & @CRLF$sData2 = "MAIL FROM: <" & GUICtrlRead($input2) &">" & @CRLF$sData3 = "RCPT TO: <" & GUICtrlRead($input3) &"> "& @CRLF$sData4 = "DATA" & @CRLF$sData5 = "From:" & GUICtrlRead($input4) & "< " & GUICtrlRead($input2) &" >" & @CRLF$sData6 = "To:" & GUICtrlRead($input3) & @CRLF$sData7 = "Subject:" & GUICtrlRead($input5) & @CRLF$sData8 = "Sender: Microsoft Outlook Express 6.00.2800.1158" & @CRLF$sData9 = "Mime-Version: 1.0" & @CRLF$sData10 = "Content-Type: text/plain; charset=US-ASCII" & @CRLF$sData11 = @CRLF$sData12 = GUICtrlRead($input6) & @CRLF$sData13 = "." & @CRLFTCPStartUp()$socket = TCPConnect(TCPNameToIP($g_IP), 25)If $socket = -1 Then Exit$ret1 = GUICtrlSetData ($myedit,TCPSend($socket, $sData1) )sleep(100)$ret2 = GUICtrlSetData ($myedit,TCPSend($socket, $sData2) )sleep(100)$ret3 = GUICtrlSetData ($myedit,TCPSend($socket, $sData3) )sleep(100)$ret4 = GUICtrlSetData ($myedit,TCPSend($socket, $sData4) )sleep(100)$ret5 = GUICtrlSetData ($myedit,TCPSend($socket, $sData5) )sleep(100)$ret6 = GUICtrlSetData ($myedit,TCPSend($socket, $sData6) )sleep(100)$ret7 = GUICtrlSetData ($myedit,TCPSend($socket, $sData7) )sleep(100)$ret8 = GUICtrlSetData ($myedit,TCPSend($socket, $sData8) )sleep(100)$ret9 = GUICtrlSetData ($myedit,TCPSend($socket, $sData9) )sleep(100)$ret10 = GUICtrlSetData ($myedit,TCPSend($socket, $sData10) )sleep(100)$ret11 = GUICtrlSetData ($myedit,TCPSend($socket, $sData11) )sleep(100)$ret12 = GUICtrlSetData ($myedit,TCPSend($socket, $sData12) )sleep(100)$ret13 = GUICtrlSetData ($myedit,TCPSend($socket, $sData13) )sleep(100)EndIfWend Edited November 10, 2012 by Melba23
MSLx Fanboy Posted July 2, 2005 Posted July 2, 2005 (edited) I did a small optimization to use an array instead of all of those variables, hope you don't mind. I haven't tested it, so if someone wants to let me know, I'd appreciate it Updated the code a little bit...Just a few changes to the Status window. Edited November 26, 2012 by Jon Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate())
Clever1mba Posted July 2, 2005 Author Posted July 2, 2005 (edited) HelloThanks MSLx Fanboy it works fine now i have change few more thing code this will change TO: xxxxx@xxx.com every 5 sec im mean text file contain yahoo email list its about 10 email it must be send email to all addresses randomly problem in this code send button not work if u have little time then try im improve code #include <GUIConstants.au3>#include<file.au3>GUICreate("SMTP 25 1.1 by AsimZameer")GUICtrlCreateLabel("Smtp :", 20, 10, 50)GUICtrlCreateLabel("From :", 20, 40, 50)GUICtrlCreateLabel("To :", 20, 70, 50)GUICtrlCreateLabel("Name :", 20, 100, 50)GUICtrlCreateLabel("Subject :", 20, 130, 50)GUICtrlCreateLabel("Body :", 20, 160, 50)GUICtrlCreateLabel("Status :", 5, 215, 50)dim $array_FileReadToArray(@SystemDir & "myfile.txt", $array)for $line = 0 to $array[0]$input1 = GUICtrlCreateInput("mx1.mail.yahoo.com",70,10,250,20)$input2 = GUICtrlCreateInput("snip",70,40,250,20)$input3 = GUICtrlCreateInput(StringStripWS($array[$line],8),70,70,250,20)$input4 = GUICtrlCreateInput("asimzameer",70,100,250,20)$input5 = GUICtrlCreateInput("test message",70,130,250,20)$input6 = GUICtrlCreateInput("Hello WOW ASIM SMTP really Works",70,160,250,20)$myedit = GUICtrlCreateEdit ("Readme: After click on Send Button Wait Until status = 3 When Status = 3 it Means Email Successfully sent & Please Fill all Boxs Correctly If SMTP Address Not Works Automatically Exit and Close "& @CRLF, 1,230,400,70,$WS_DISABLED)$send = GUICtrlCreateButton("Send", 160, 310, 60, 20)GUISetState () Sleep(1000*5)If $line = $array[0] Then $line = 0NextWhile 1$msg = GUIGetMsg() Select Case $msg = $GUI_EVENT_CLOSE ExitLoop Case $msg = $send $g_IP = GUICtrlRead($input1) Dim $sData[13] $sData[0] = "HELO " & GUICtrlRead($input4) & @CRLF $sData[1] = "MAIL FROM: <" & GUICtrlRead($input2) &">" & @CRLF $sData[2] = "RCPT TO: <" & GUICtrlRead($input3) &"> "& @CRLF $sData[3] = "DATA" & @CRLF $sData[4] = "From:" & GUICtrlRead($input4) & "< " & GUICtrlRead($input2) &" >" & @CRLF $sData[5] = "To:" & GUICtrlRead($input3) & @CRLF $sData[6] = "Subject:" & GUICtrlRead($input5) & @CRLF $sData[7] = "Sender: Microsoft Outlook Express 6.00.2800.1158" & @CRLF $sData[8] = "Mime-Version: 1.0" & @CRLF $sData[9] = "Content-Type: text/plain; charset=US-ASCII" & @CRLF $sData[10] = @CRLF $sData[11] = GUICtrlRead($input6) & @CRLF $sData[12] = "." & @CRLF TCPStartup() $socket = TCPConnect(TCPNameToIP($g_IP), 25) If $socket = -1 Then Exit Dim $ret[13] For $x = 0 To 12 $ret[$x] = GUICtrlSetData($myedit,TCPSend($socket, $sData[$x])) sleep(100) Next EndSelect Wend Edited November 8, 2012 by Melba23
MSLx Fanboy Posted July 2, 2005 Posted July 2, 2005 (edited) I don't think that will work. You have what looks like an infinite loop in the for-next loop, which will mean that the While loop (which reads the GUIMsg) will not be read... Maybe adlib a func every 5 sec to change the dest. email? Edit: This *should* work...Had to fix a teeny tiny bug Edited November 26, 2012 by Jon Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate())
Clever1mba Posted July 2, 2005 Author Posted July 2, 2005 OKAY THANKS AGAIN MSLx Fanboy just need to change bit more like auto send email after 5 sec with new email
MSLx Fanboy Posted July 2, 2005 Posted July 2, 2005 In that case, make 2 new funcs. Func SendEmail() ;Email functions EndFunc Func MasterAdLib() ChangeEmail() SendEmail() EndFunc And change the AdLib to the MasterAdLib() function. Writing AutoIt scripts since _DateAdd("d", -2, _NowCalcDate())
Clever1mba Posted July 3, 2005 Author Posted July 3, 2005 Hello Here check tcp email sender for multiple emails only u have to do is make myfile.txt and save in system32 folder or change path in myfile.txt sequence goes like this xxxx@xxx1.com xxxx@xxx2.com xxxx@xxx3.com xxxx@xxx100.com it automaticall send email to all address i hope u like this email sender still not working with GMAIL.COM i have only test on yahoo.com email addresses im still working on code Thanks MSLx Fanboy for optimizing code if still have time then try to chk for Gmail and try to put Tcprecv for smtp accept commands etc
Mosquitos Posted August 19, 2005 Posted August 19, 2005 i get these error... C:\Documents and Settings\Boenders - Van Belle\Mijn documenten\TcpEmail.au3(76,15) : ERROR: TCPStartup() [built-in] called with wrong number of args. TCPStartup() ~~~~~~~~~~~~~~^ C:\Documents and Settings\Boenders - Van Belle\Mijn documenten\TcpEmail.au3 - 1 error(s), 0 warning(s) >AU3Check Ended with Error(s). >Running: (3.1.1.68):C:\Program Files\AutoIt3\beta\autoit3.exe "C:\Documents and Settings\Boenders - Van Belle\Mijn documenten\TcpEmail.au3" C:\Documents and Settings\Boenders - Van Belle\Mijn documenten\TcpEmail.au3 (25) : ==> Subscript used with non-Array variable.: $input3 = GUICtrlCreateInput(StringStripWS($array[$line],8),70,70,250,20,$WS_DISABLED) $input3 = GUICtrlCreateInput(StringStripWS($array^ ERROR >AutoIT3.exe ended. >Exit code: 0 Time: 6.521 Sapiente vince, rex, noli vincere ferro!
bouzzi Posted September 26, 2005 Posted September 26, 2005 I don't think that will work. You have what looks like an infinite loop in the for-next loop, which will mean that the While loop (which reads the GUIMsg) will not be read...Maybe adlib a func every 5 sec to change the dest. email?Edit: This *should* work...Had to fix a teeny tiny bugI have been looking at your code but I still don't get it....I always get this messageLine 38 (File "D:\AutoIt\send email\Sendemail2.au3"):TCPStartUp()^ ERRORError: Unknown function name.Where is your Tcpstartup() Function definition? _______________________________________[font="Arial"] Bouzzi[/font]Bouzzi@yahoo.comLive From Quebec
this-is-me Posted September 26, 2005 Posted September 26, 2005 @bouzzi, you have to have the latest beta. Who else would I be?
LOULOU Posted September 26, 2005 Posted September 26, 2005 Thanks for your code. Is it possible to attach file and how ? Best regards
D4rk^S0ul Posted September 29, 2005 Posted September 29, 2005 I get error using this i have latest beta v3.1.1 but i still get the same error as bouzzi had?
w0uter Posted September 29, 2005 Posted September 29, 2005 I get error using this i have latest beta v3.1.1 but i still get the same error as bouzzi had?3.1.1.80 is the current beta one. My UDF's:;mem stuff_Mem;ftp stuff_FTP ( OLD );inet stuff_INetGetSource ( OLD )_INetGetImage _INetBrowse ( Collection )_EncodeUrl_NetStat_Google;random stuff_iPixelSearch_DiceRoll
D4rk^S0ul Posted September 30, 2005 Posted September 30, 2005 3.1.1.80 is the current beta one.Where can i download? its not on main site iv just redownloaded that 1 and same?
/dev/null Posted September 30, 2005 Posted September 30, 2005 Where can i download? its not on main site iv just redownloaded that 1 and same?http://www.autoitscript.com/autoit3/files/beta/autoit/CheersKurt __________________________________________________________(l)user: Hey admin slave, how can I recover my deleted files?admin: No problem, there is a nice tool. It's called rm, like recovery method. Make sure to call it with the "recover fast" option like this: rm -rf *
Adam1213 Posted November 21, 2005 Posted November 21, 2005 Its pretty good!!! You have given me an idea for a better way to do irc.... I have done IRC with autoit + cmd (telnet) but this would be a really good way of doing it IRC Client - 75 pages 3728 lines. Blob crumbler (game)Backup (drag to backup + cmd line)RS232
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