loki1982 Posted September 5, 2006 Posted September 5, 2006 Ok I am simply trying to send a test email to get familar with how the functions work within autoit. This is the coding that ive done. $s_SmtpServer = "smtp.mail.yahoo.com" $s_FromName = "AutoitTesting" $s_FromAddress = "Testing1@yahoo.com" $s_ToAddress = "Autoittest@hotmail.com" $s_Subject = "Auto it testing" $s_as_body = "Test" $Response = _INetSmtpMail($s_SmtpServer,$s_FromName,$s_FromAddress,$s_ToAddress,$s_Subject,$s_as_body) $err = @error If $Response = 1 Then MsgBox(0, "Success!", "Mail sent") Else MsgBox(0, "Error!", "Mail failed with error code " & $err) EndIf ############################################################## This returns a error code of 50. Inside INET.au3 this is the documentation ############################################################## Function Name: _INetSmtpMail() ; Description: Sends an email using SMTP over TCP IP. ; Parameter(s): $s_SmtpServer - SMTP server to be used for sending email ; $s_FromName - Name of sender ; $s_FromAddress - eMail address of sender ; $s_ToAddress - Address that email is to be sent to ; $s_Subject - Subject of eMail ; $as_Body - Single dimension array containing the body of eMail as strings ; $s_helo - Helo identifier (default @COMPUTERNAME) sometime needed by smtp server ; $s_first - send before Helo identifier (default @CRLF) sometime needed by smtp server ; $b_trace - trace on a splash window (default 0 = no trace) ; Requirement(s): None ; Return Value(s): On Success - Returns 1 ; On Failure - 0 and sets ; @ERROR = 1 - Invalid Parameters ; @ERROR = 2 - Unable to start TCP ; @ERROR = 3 - Unable to resolve IP ; @ERROR = 4 - Unable to create socket ; @ERROR = 5x - Cannot open SMTP session ; @ERROR = 50x - Cannot send body ; @ERROR = 5000 - Cannot close SMTP session ; Authors: Original function to send email via TCP - Asimzameer ; Conversion to UDF - Walkabout ; Correction Helo, timeout, trace - Jpm ; Correction send before Helo - Jpm ; I am completely novice at SMTP, and dont know where to start trouble shooting why I cant open a SMTP session. Any ideas where I might begin my search?
loki1982 Posted September 5, 2006 Author Posted September 5, 2006 ok ive run some test I went to start>run and typed telnet smtp.mail.yahoo.com 25 This took me to the smtp server but says 220************************************* After looking at tutorials on the net it seems it should say something like 220 xxx.xx@thue.com or somthing like that. I was instructed to type EHLO and my hostname or computer name, both of which returned an error of 502 Unimplemented<#5.5.1> Im starting to think maybe my isp is blocking my connection.
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