title: ASP.NET Core + Amazon SES: The remote certificate is invalid according to the validation procedure
body: <p>I am trying to send email using ASP.NET Core, MailKit and Amazon SES:</p>
  
  <pre><code>  using (SmtpClient client = new SmtpClient(new ProtocolLogger("smtp.log"))) {
        client.Connect("email-smtp.us-east-1.amazonaws.com", 587, SecureSocketOptions.StartTls);
        client.Authenticate("myusername", "mypassword");
        await client.SendAsync(message);
        client.Disconnect(true);
    }
  </code></pre>
  
  <p>I keep getting the error "The remote certificate is invalid according to the validation procedure.".</p>
  
  <p>And the log file shows:</p>
  
  <pre><code>Connected to smtp://email-smtp.us-east-1.amazonaws.com:587/?starttls=always
  S: 220 email-smtp.amazonaws.com ESMTP SimpleEmailService-1737464811 qt5bXhIgVseJaHPspjp4
  C: EHLO [127.0.0.1]
  S: 250-email-smtp.amazonaws.com
  S: 250-8BITMIME
  S: 250-SIZE 10485760
  S: 250-STARTTLS
  S: 250-AUTH PLAIN LOGIN
  S: 250 Ok
  C: STARTTLS
  S: 220 Ready to start TLS
  </code></pre>
  
  <p>What am I missing?</p>