Tiger Posted January 6, 2008 Share Posted January 6, 2008 I have a problem with this example: #include <INet.au3> $s_SmtpServer = "mysmtpserver.com.au" $s_FromName = "My Name" $s_FromAddress = "From eMail Address" $s_ToAddress = "To eMail Address" $s_Subject = "My Test UDF" Dim $as_Body[2] $as_Body[0] = "Testing the new email udf" $as_Body[1] = "Second Line" $Response = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body) $err = @error If $Response = 1 Then MsgBox(0, "Success!", "Mail sent") Else MsgBox(0, "Error!", "Mail failed with error code " & $err) EndIf Error: ""Mail failed with error code 50" @ERROR = 50x - Cannot send body. x indicates the line number of $as_Body (first line is 0)." My UDFs:- _RegEnumKey Link to comment Share on other sites More sharing options...
picaxe Posted January 7, 2008 Share Posted January 7, 2008 (edited) Check for valid smtp server @ERROR = 5x - Cannot open SMTP session. x indicates the index number of last command issued to the SMTP server. Also try setting $b_trace to see the smtp session dialog $Response = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body, @ComputerName, -1, 1) Also check that your firewall is not preventing outgoing smtp connection. Edited January 7, 2008 by picaxe Link to comment Share on other sites More sharing options...
Tiger Posted January 7, 2008 Author Share Posted January 7, 2008 OK. I use the the smtp-server from a company. My UDFs:- _RegEnumKey Link to comment Share on other sites More sharing options...
adickreiter Posted January 16, 2008 Share Posted January 16, 2008 OK. I use the the smtp-server from a company.Did you ever figure out what was causing this? I'm trying to do something similar for my company and I'm getting the exact same thing. "Mail failed with error code 50"Help? Link to comment Share on other sites More sharing options...
CityOfNashua Posted July 29, 2010 Share Posted July 29, 2010 Did you ever figure out what was causing this? I'm trying to do something similar for my company and I'm getting the exact same thing. "Mail failed with error code 50"Help?$Response = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body, @ComputerName, -1, 0) should work without opening a dialog box with the SMTP connection info. Link to comment Share on other sites More sharing options...
Developers Jos Posted July 29, 2010 Developers Share Posted July 29, 2010 $Response = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body, @ComputerName, -1, 0) should work without opening a dialog box with the SMTP connection info.What is the point of this reply to a 2.5 year old post? SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
ButtonFury Posted January 26, 2012 Share Posted January 26, 2012 What is the point of this reply to a 2.5 year old post?Because you never know if someone will come along several years later and find the answer he was looking for. Link to comment Share on other sites More sharing options...
prgwkp Posted February 24, 2012 Share Posted February 24, 2012 Im glad he did update even after 2.5 years later, what he posted just solved my very same issue! Link to comment Share on other sites More sharing options...
karthik001 Posted August 9, 2017 Share Posted August 9, 2017 The solution from CityOfNashua worked for me. Great and Thanks !!!! 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