简单的asp.net发送邮件的代码,VB.net代码
<%@ Import Namespace="System.Web.Mail"%> <% Dim objMail As New System.Web.Mail.MailMessage() objMail.From = "recipient_address1@domain.com" objMail.To = "recipient_address2@domain.com" objMail.Subject = "The Subject Line" objMail.BodyFormat = MailFormat.Html 'MailFormat.Text to send plain text email objMail.Priority = MailPriority.High objMail.Body = "********************<BR>" & _ "Thank you for visiting my website" & _ "********************<BR>" System.Web.Mail.SmtpMail.SmtpServer = "mail.yoursmtpserver.com" System.Web.Mail.SmtpMail.Send(objMail) objMail = Nothing %>