@{
try
{
WebMail.SmtpServer = "smtp.qq.com";
WebMail.SmtpPort = 465;
WebMail.EnableSsl = true;
WebMail.UserName = "youyiyangcn";
WebMail.Password = "*******";
WebMail.From = "rsvps@example.com";
WebMail.Send("youyiyangcn@qq.com", "RSVP Notification",
Model.Name + " is " + ((Model.WillAttend ?? false) ? "" : "not")
+ "attending");
}
catch (Exception)
{
@:Sorry - we couldn't send the email to confirm your RSVP.
}
}
请问这里的catch(Exception)能否用e.toString的方法把报错的详细信息打印出来?谢谢!