Outlook SMTPClient server error 5.3.4 5.2.0
<p>I have an MVC .NET web application that has been running stable for the most part of a year now. However today we received an error code and I'm having trouble finding how to resolve the issue. </p>

<p>In the application, I use SMTPClient to send emails out. For this, we use an Outlook email account. This was working fine until today. The error code that I get is this:</p>

<blockquote>
  <p>Mailbox unavailable. The server response was: 5.3.4 554-554 5.2.0 STOREDRV.Deliver; delivery result banner </p>
</blockquote>

<p>Here is the code that I use in my application. </p>

<pre><code>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"])
};
</code></pre>

<p><code>WebConfigurationManager.AppSettings["EmailHost"]</code>, is set to <code>smtp.live.com</code> in the webconfig.</p>

<p>After this, I add data and the other information needed of course, but I omitted that. The error is thrown when we arrive at the last part of the code: <code>client.Send(mail);</code></p>

<p>Things I have tried so far that did not work. </p>

<ul>
<li>Login to the email account on outlook.live.com;</li>
<li>Update security settings on outlook.live.com for the email account;</li>
<li>Changed <em>smtp.live.com</em> to <em>smtp-mail.outlook.com</em>;</li>
<li>Changed the Port to 25 (which gave me the same error) and 465 (Which gave me a server not reached error);</li>
<li>Set EnableSsl to false (Client doesn't work when I do that).</li>
</ul>

<p>I have seen several posts on SO and other websites that are similar or have the same error code. But they either go unanswered or they mark logging in to the email account as the solution, which does not work for me. </p>

<p>When we logged into the email account we got an update notice from Microsoft talking about the new privacy and security update. This was from September 16th. I don't know if there is a three-month time limit within which you need to agree to it. But a week ago the email account has sent an email, and yesterday it failed on sending one. We agreed to the agreement pop up but it is still not working though. </p>

<p>Does anybody have any idea what I can try now or what is causing this error? </p>