prgwkp Posted February 24, 2012 Share Posted February 24, 2012 Does anyone see anything wrong with this? The email does not send and I get an error of "Mail failed with error code 50". From the Help guide, this seems to be a problem with the body. I have even tried removing the code for the body, still same error. #include <Inet.au3> Local $s_SmtpServer = "mailrelay.XXX.XXX" Local $s_FromName = "prgwkp" Local $s_FromAddress = "XXX@Server.com" Local $s_ToAddress = "XXXXX@XXX.com" Local $s_Subject = "Subject Test" Local $as_Body[2] $as_Body[0] = "Body Test" $as_Body[1] = "Second Line" Local $Response = _INetSmtpMail($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body) Local $err = @error If $Response = 1 Then MsgBox(0, "Success!", "Mail sent") Else MsgBox(0, "Error!", "Mail failed with error code " & $err) EndIf Link to comment Share on other sites More sharing options...
prgwkp Posted February 24, 2012 Author Share Posted February 24, 2012 After looking at the error code 50 again in the Help files, its 5x, where x is the last command issues, so apparently its not opening the SMTP session. I know the SMTP info is correct, any thoughts on why it would not open it? Link to comment Share on other sites More sharing options...
prgwkp Posted February 24, 2012 Author Share Posted February 24, 2012 I solved it. Link to comment Share on other sites More sharing options...
NATO Posted February 29, 2012 Share Posted February 29, 2012 What was the solution? I'm running into a similar issue. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted March 1, 2012 Moderators Share Posted March 1, 2012 Hi, Nato. If you would like to post your code, we can do our best to assist "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
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