SendMail()
语法
Result = SendMail(#Mail, Smtp$ [, Port [, Asynchronous [, User$, Password$]]])概要
Send the specified mail.
参数
The mail to send. Smtp$ The address of the mail server to use for sending the mail. Port (optional) The port of the mail server. The default is port 25. Asynchronous (optional) Whether the transfer should be done in the background. If this parameter is nonzero then the function returns immediately and the progress can be checked with the MailProgress() function. If this parameter is zero or not specified, then the function blocks until the mail was sent or there was an error. User$, Password$ (optional) The user and password used for SMTP authentication, if the server requires it.
返回值
Returns nonzero if the mail was sent correctly and zero otherwise.
示例
InitNetwork() ; Note: change the address and smtp to have a working example ; If CreateMail(0, "test@youraddress.com", "Hello") AddMailRecipient(0, "youraddress@youraddress.com", #PB_Mail_To) Debug SendMail(0, "smtp.yourfavoritesmtp.com") EndIf
参阅
CreateMail(), MailProgress()
已支持操作系统
所有