Answer the question
In order to leave comments, you need to log in
SMTP. Why e.Message = Operation timed out?
try
{
WebMail.SmtpServer = "smtp.yandex.ru";
WebMail.SmtpPort = 465;
WebMail.EnableSsl = true;
WebMail.UserName = "s.endmail";
WebMail.Password = "[email protected]$w0rd";
WebMail.From = "[email protected]";
WebMail.Send("[email protected]", "RSVP Приглашение",
Model.Name + ((Model.WillAttend ?? false) ? "" : "не") + "придет");
}
catch (Exception e)
{
@:<b>К сожалению при отправке письма возникла ошибка.</b>
}
Answer the question
In order to leave comments, you need to log in
I had the same problem, I tried with different mails, I found out that most mailers turned off access to smtp from third-party programs, except for a few mailers.
It is necessary to take your own, it usually goes to hosting.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question