拐角的蜗牛

ASP.NET 发邮件

 

1Dim 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
12SmtpMail.SmtpServer = "smtp.163.com"
13SmtpMail.Send( mail )

posted on 2006-06-23 10:20  拐角的蜗牛  阅读(156)  评论(0)    收藏  举报

导航