WebMail

try {
      WebMail.SmtpServer = "smtp.example.com";
     WebMail.SmtpPort = 587;
     WebMail.EnableSsl = true;
     WebMail.UserName = "mySmtpUsername";
     WebMail.Password = "mySmtpPassword";
     WebMail.From = "rsvps@example.com";
     WebMail.Send("party-host@example.com", "RSVP Notification",
     Model.Name + " is " + ((Model.WillAttend ?? false) ? "" :
     "not")
     + "attending");
} catch (Exception) {
     @:<b>Sorry - we couldnt send the email to confirm your RSVP.
     </b>
}

 

WebMail,布布扣,bubuko.com

WebMail

上一篇:Mysql 用一个表里的数据 更新另一个表的数据


下一篇:Javascript垃圾回收机制(学习笔记)