I have an MVC.NET web application that has been running stably for most of the year. However, today we received an error code, and I had problems finding a solution to the problem.
In the application, I use SMTPClient to send email. For this we use Outlook email. This has worked to this day. The error code I get is this:
Mailbox not available. Server response: 5.3.4 554-554 5.2.0 STOREDRV.Deliver; delivery banner
Here is the code that I use in my application.
var client = new SmtpClient
{
Host = WebConfigurationManager.AppSettings["EmailHost"],
Port = 587,
EnableSsl = true,
DeliveryMethod = SmtpDeliveryMethod.Network,
UseDefaultCredentials = false,
Credentials = new System.Net.NetworkCredential(WebConfigurationManager.AppSettings["EmailSender"],
WebConfigurationManager.AppSettings["EmailSenderPassword"])
};
WebConfigurationManager.AppSettings ["EmailHost"] is set to smtp.live.com in webconfig.
, . , ; client.Send(mail);
, , .
- outlook.live.com.
- outlook.live.com .
- smtp.live.com smtp-mail.outlook.com
- 25 ( ) 465 ( , )
- EnableSsl false ( , )
SO , . , , .
, Microsoft . 16 . , , . , . , , .
- , ?