title: C# Mail Kit - Office 365 - Server issue
body: <p>I have been using Mailkit in my C# webapps for a while now. Never had any issues before, but today I started getting the following error when I attempt to send:</p>
  
  <blockquote>
    <p>AuthenticationException: ErrorInProcessing: 4.7.0 Temporary server error. Please try again later. PRX4 [SYXPR01CA0117.ausprd01.prod.outlook.com]
    Authenticate</p>
  </blockquote>
  
  <p>I was originally running MailKit 1.6 but as this has happened I have upgraded Mailkit to 2.4 in an attempt to fix this. </p>
  
  <p>Below is the code I am using to send emails.</p>
  
  <pre><code>        using (var client = new SmtpClient())
          {
              client.LocalDomain = "smtp.office365.com";
              await client.ConnectAsync("smtp.office365.com", 587, SecureSocketOptions.StartTls).ConfigureAwait(false);
              client.Authenticate("EmailAddress", "Password");
              await client.SendAsync(emailMessage).ConfigureAwait(false);
              await client.DisconnectAsync(true).ConfigureAwait(false);
          }
  </code></pre>
  
  <p>If anyone has come across this issue or has some ideas to get around this, let me know!</p>
  
  <p>Called Microsoft to confirm they didn't believe they were having issues with there exchange servers at the moment.</p>
  
  <p>UPDATE </p>
  
  <p>After more testing have confirmed I can telnet to the instance of office365 fine. and I can also send an email using Powershell with the following code</p>
  
  <pre><code>$msolcred = get-credential
  Send-MailMessage –From emailaddress –To emailaddress  –Subject “Test Email” –Body “Test” -SmtpServer smtp.office365.com -Credential $msolcred -UseSsl -Port 587
  </code></pre>