Arlen Posted April 29, 2017 Share Posted April 29, 2017 I'm trying to send an email but I have no luck, always getting this error "Error code 50" from the example script. #include <Inet.au3> #include <MsgBoxConstants.au3> Local $s_SmtpServer = "smtp.gmail.com" Local $s_FromName = "My Name" Local $s_FromAddress = "example@gmail.com" Local $s_ToAddress = "example2@gmail.com" Local $s_Subject = "My Test UDF" Local $as_Body[2] $as_Body[0] = "Testing the new email udf" $as_Body[1] = "Second Line" Local $iResponse = _INetSmtpMail($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body, "EHLO " & @ComputerName, -1, 1) Local $iErr = @error If $iResponse = 1 Then MsgBox($MB_SYSTEMMODAL, "Success!", "Mail sent") Else MsgBox($MB_SYSTEMMODAL, "Error!", "Mail failed with error code " & $iErr) EndIf Allow less secure apps on gmail is ON Link to comment Share on other sites More sharing options...
Developers Jos Posted April 29, 2017 Developers Share Posted April 29, 2017 Look for _INetSmtpMailCom in examples as the standard _INetSmtpMail() doensn't support secure email used by Gmail. Jos 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...
Arlen Posted April 29, 2017 Author Share Posted April 29, 2017 7 minutes ago, Jos said: Look for _INetSmtpMailCom in examples as the standard _INetSmtpMail() doensn't support secure email used by Gmail. Jos Okay. What smtp server does it support? thanks in advance. Link to comment Share on other sites More sharing options...
Arlen Posted April 29, 2017 Author Share Posted April 29, 2017 25 minutes ago, Arlen said: Okay. What smtp server does it support? thanks in advance. NVM thanks Link to comment Share on other sites More sharing options...
MWIDNER21 Posted May 24, 2017 Share Posted May 24, 2017 Hello, I get this same error. The weird thing is that I get this error when trying to run this on a newer version of AutoIT. I have older scripts that I run with the exact same code and they still work fine. Link to comment Share on other sites More sharing options...
Developers Jos Posted May 24, 2017 Developers Share Posted May 24, 2017 The same error on what? _INetSmtpMail() never worked with GMail. Jos 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...
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