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
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