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 couldn't send the email to confirm your RSVP.
     </b>
}

 

相关文章:

  • 2022-02-20
  • 2022-12-23
  • 2022-01-01
  • 2022-12-23
  • 2022-12-23
  • 2021-08-13
  • 2021-06-21
猜你喜欢
  • 2022-02-26
  • 2021-05-11
  • 2022-12-23
  • 2021-07-15
  • 2022-01-10
  • 2021-11-30
相关资源
相似解决方案