码迷,mamicode.com
首页 > Web开发 > 详细

WebMail

时间:2014-06-21 06:09:44      阅读:254      评论:0      收藏:0      [点我收藏+]

标签:style   class   blog   code   color   com   

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

标签:style   class   blog   code   color   com   

原文地址:http://www.cnblogs.com/dotnetmvc/p/3797000.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!