扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
作者:builder.com.cn 2007年3月27日
关键字:
private void Page_Load(object sender, System.EventArgs e) {
System.Text.StringBuildersb = new System.Text.StringBuilder();
System.Web.Mail.MailMessage mail = new System.Mail.Web.MailMessage();
mail.To = "recipient@address";
mail.From = "sender";
mail.Subject = "Test";
mail.BodyFormat = System.Web.Mail.MailFormat.Html;
sb.Append("<html><head><title>Test</title><body>");
sb.Append("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">");
sb.Append("<tr><td>");
sb.Append("<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">");
sb.Append("<tr><td style=\"FONT-SIZE: 14pt;COLOR: blue; FONT-FAMILY: Arial, Monospace; \">Header</td></tr></table>");
sb.Append("</td></tr>");
sb.Append("<tr><td>");
sb.Append("Body");
sb.Append("</td></tr>");
sb.Append("<tr><td>");
sb.Append("Footer");
sb.Append("</td></tr></table>");
sb.Append("</body></html>");
mail.Body = sb.ToString();
System.Web.Mail.SmtpMail.SmtpServer = "localhost"; //Your Smtp Server
System.Web.Mail.SmtpMail.Send(mail);
}
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。