System.Web.Mail 己改為 System.net.Mail
請參考 : http://msdn.microsoft.com/zh-tw/library/dk1fb84h(v=VS.80).aspx
VB範例 :
Dim client As New System.Net.Mail.SmtpClient
client.Host = System.Configuration.ConfigurationManager.AppSettings("SMTP") => 將SMTP server 位置 預先放置在web.config 中<appSettings> 裡
Dim mymail As New MailMessage
.......
client.Send(mymail)
全站熱搜