MirnesC2 Posted November 22, 2009 Share Posted November 22, 2009 I used both the smpt and regular mail examples from the help files and neither worked. #include <INet.au3> $s_SmtpServer = "smtp.gmail.com" $s_FromName = "Mirnes" $s_FromAddress = "MirnesC92@gmail.com" $s_ToAddress = "MirnesC92@gmail.com" $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 Returns error msg 50 with no email sent. #include <INet.au3> $Address = InputBox('Address', 'Enter the E-Mail address to send message to') ;mirnesc92@gmail.com $Subject = InputBox('Subject', 'Enter a subject for the E-Mail') ;test $Body = InputBox('Body', 'Enter the body (message) of the E-Mail') ;test MsgBox(0,'E-Mail has been opened','The E-Mail has been opened and process identifier for the E-Mail client is ' & _INetMail($address, $subject, $body)) Returns 0 for failure, no email sent Link to comment Share on other sites More sharing options...
Developers Jos Posted November 22, 2009 Developers Share Posted November 22, 2009 GMail doesn't allow standard smtp connections. Look for _InetSMTPMailCom() in the Examples forum that does support 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...
MirnesC2 Posted November 22, 2009 Author Share Posted November 22, 2009 (edited) Yup, your example worked! Tanks!! http://www.autoitscript.com/forum/index.php?showtopic=23860&hl=_InetSMTPMailCom%28%29%20&st=0 Edited November 22, 2009 by MirnesC2 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