Dim mail As new System.Web.Mail.MailMessage()
try
mail.To = "13653049456@139.com;13653041651@139.com"
mail.Cc = "13653049456@139.com;13653041651@139.com"
mail.From = "18312610086@139.com"
mail.Subject = "测试主题"
mail.BodyFormat = System.Web.Mail.MailFormat.Html
mail.Body = "测试内容"
mail.Priority="2" '设置邮件优先级
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1") '//身份验证
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", mail.From) '//邮箱登录账号,这里跟前面的发送账号一样就行
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "mmgk20190618") '//这个密码要注意:如果是一般账号,要用授权码企业账号用登录密码
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpserverport", 25)'//端口
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpusessl", "true")'//SSL加密
System.Web.Mail.SmtpMail.SmtpServer = "smtp.139.com" '//企业账号用smtp.exmail.qq.com
System.Web.Mail.SmtpMail.Send(mail)
msgbox("邮件发送成功 ")
catch ex As Exception
msgbox("邮件发送失败 : " & ex.Message )
End try
为什么 mail.Priority="2" '设置邮件优先级没有效果?麻烦老师帮忙看看。
[此贴子已经被作者于2019/11/12 11:18:45编辑过]