我用这个来发邮件,但每次都弹出"与服务器的传输连接失败"的对话框,请问哪位高手能指点一二?
#include "SmtpMailer.au3"
$s_SmtpServer = "smtp.163.com " ; smtp服务器 address for the smtp-server to use - REQUIRED
$s_FromName = "小恒" ; 邮件发送人 name from who the email was sent
$s_FromAddress = "*****hesrt@163.com" ; 邮件发送者地址address from where the mail should come
$s_ToAddress = "*****917@qq.com" ; 邮件发送给谁 destination address of the email - REQUIRED
$s_Subject = "hello" ;邮件标题 subject from the email - can be anything you want it to be
$as_Body ="hello" ; 邮件正文the messagebody from the mail - can be left blank but then you get a blank mail
$s_AttachFiles = "" ; 附件地址 the file you want to attach- leave blank if not needed
$s_CcAddress = "" ; address for cc - leave blank if not needed
$s_BccAddress = "" ; address for bcc - leave blank if not needed
$s_Username = "****hesrt" ; 用户名 username for the account used from where the mail gets sent - REQUIRED
$s_Password = "******" ; 密码password for the account used from where the mail gets sent - REQUIRED
$IPPort=25 ; yidabu.com提示:Gmail使用的发送端口
$ssl=1 ; yidabu.com提示:Gmail要启用安全连接
Global $oMyRet[2]
Global $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc")
$rc = _INetSmtpMailCom($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body, $s_AttachFiles, $s_CcAddress, $s_BccAddress, $s_Username, $s_Password, $IPPort, $ssl)
If @error Then
MsgBox(0, "Error sending message", "Error code:" & @error & " Description:" & $rc)
EndIf
[ 本帖最后由 水之心 于 2009-1-17 08:38 编辑 ] |