你说的UDF我找到了。
可以发送邮件,但不可以发送附件。怎么回事啊。
高手看看啊
#include <SmtpMailer.au3>
$s_SmtpServer = "smtp.gmail.com" ; smtp服务器 address for the smtp-server to use - REQUIRED
$s_FromName = "myname" ; 邮件发送人 name from who the email was sent
$s_FromAddress = "myusrnme@gmail.com" ; 邮件发送者地址address from where the mail should come
$s_ToAddress = "myusrnme@gmail.com" ; 邮件发送给谁 destination address of the email - REQUIRED
$s_Subject = "autoittest" ;邮件标题 subject from the email - can be anything you want it to be
$as_Body = "autoittest" & @CRLF & _
"http://bbs.yidabu.com/forum-2-1.html" ; 邮件正文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 = "myusrnme" ; 用户名 username for the account used from where the mail gets sent - REQUIRED
$s_Password = "mypass" ; 密码password for the account used from where the mail gets sent - REQUIRED
$IPPort=465 ; 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
|