k9lego Posted March 20, 2013 Share Posted March 20, 2013 (edited) I'm trying yo make it send an email through email, any chance someone could help me by typing everything out? I always get error 4 - Unable to create socket how do you fix that. #include <INet.au3> $s_SmtpServer = "xxxxxx" $s_FromName = "xxxxxx" $s_FromAddress = "xxxxxx@xxxxx.xxx" $s_ToAddress = "xxxxxx@xxxxxx.xxx" $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 EDIT: I am sending through gmail Edited March 20, 2013 by k9lego Link to comment Share on other sites More sharing options...
Developers Jos Posted March 20, 2013 Developers Share Posted March 20, 2013 .. and you are sending to which email server? 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...
k9lego Posted March 20, 2013 Author Share Posted March 20, 2013 (edited) I am using gmail. my computer is windows. Edited March 20, 2013 by k9lego Link to comment Share on other sites More sharing options...
Developers Jos Posted March 20, 2013 Developers Share Posted March 20, 2013 Gmail doesn't support standard SMTP mail hence your problem. Look for _InetSmtpMailCom() in the examples forum which does support that. 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...
k9lego Posted April 22, 2013 Author Share Posted April 22, 2013 ok, thanks. ---------------------------------topic closed------------------------- its not really closed, but there is no reason for you to reply. ------------------------------------------------------------------------- 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