























1
Dim mail As New MailMessage()
2
mail.To = mailTo.Text
3
mail.From = "gghouse@163.com"
4
mail.Subject = mailSubject.Text
5
mail.BodyFormat = MailFormat.Text
6
mail.Body = mailBody.Text
7
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/smtpauthenticate", "1")
8
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendusername", "xxx@163.com")
9
mail.Fields.Add("http://schemas.microsoft.com/cdo/configuration/sendpassword", "xxx的密码")
10
11
On Error Resume Next
12
SmtpMail.SmtpServer = "smtp.163.com"
13
SmtpMail.Send( mail )
14
15
之前有做过邮件发送的,不过下面第7行开始的东西对我来说还是新知识
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。