title: MailKit.Net.Smtp.SmtpClient SMTP server does not support authentication
body: <p>I'd like to use MailKit to send an email through our Exchange server, using the credentials of the process.</p>
  <p>Building up a System.Net.Mail.SmtpClient and NetworkCredential with domain/username/password works, but while using MailKit.Net.Smtp.SmtpClient and NetworkCredential does not work. Throw exception like</p>
  <p>Exception Message :The SMTP server does not support authentication.
  Trace Message :   at MailKit.Net.Smtp.SmtpClient.d__73.MoveNext()
  --- End of stack trace from previous location where exception was thrown ---
  at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
  at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
  at MailKit.Net.Smtp.SmtpClient.Authenticate(Encoding encoding, ICredentials credentials, CancellationToken cancellationToken)
  at MailKit.MailService.Authenticate(ICredentials credentials, CancellationToken cancellationToken)
  at SMTP_EmailCheck.Program.SendMail_MailKit_WithDomain() in D:\Work\SMTP_EmailCheck\SMTP_EmailCheck\Program.cs:line 123</p>
  <pre><code>ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;
              var mailMessage = new MimeMessage();
              mailMessage.From.Add(new MailboxAddress(fromMailAddress));
              mailMessage.To.Add(new MailboxAddress(toMailAddress));
               mailMessage.Subject = &quot;SendMail_MailKit_WithDomain&quot;;
              mailMessage.Body = new TextPart(TextFormat.Plain)
              {
                  Text = &quot;Hello&quot;
              };
  
              using (var smtpClient = new MailKit.Net.Smtp.SmtpClient())
              {
                  smtpClient.Connect(&quot;MailServer&quot;, 25, MailKit.Security.SecureSocketOptions.None);                   
                  var creds = new NetworkCredential(&quot;UserName&quot;, &quot;Password&quot;, &quot;Domain&quot;);
                  smtpClient.Authenticate(creds);                    
                  smtpClient.Send(mailMessage);
                  smtpClient.Disconnect(true);
              }
  </code></pre>
  <p>Thanks in advance</p>