|
#include <INet.au3>
$s_SmtpServer = "mail.dqyt.petrochina"
$s_FromName = "zougk"
$s_FromAddress = "zougk@petrochina.com.cn"
$s_ToAddress = "zougk@petrochina.com.cn"
$s_Subject = "test"
;Dim $as_Body[2]
;$as_Body[0] = "Testing the new email udf"
;$as_Body[1] = "Second Line"
;MsgBox(0,'',$as_Body[0] & @CRLF & $as_Body[1])
$Response = _INetSmtpMail ($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject)
$err = @error
If $Response = 1 Then
MsgBox(0, "Success!", "Mail sent")
Else
MsgBox(0, "Error!", "Mail failed with error code " & $err)
EndIf
;返回错误代码是50:无法发送内容 |
|