Hi,
I'm using mailkit to send mail forms from my web site.
But I have problems with authentication - getting response from gmail server error 500.
 using (var client = new SmtpClient())
            {
                var credentials = new NetworkCredential
                {
                    UserName = "admin@parogsingler.dk", // replace with valid value
                    Password = "popopopo" // replace with valid value
                };
//client.LocalDomain = "parogsingler.dk";
// check your smtp server setting and amend accordingly:
client.Connect("smtp.gmail.com", 587, SecureSocketOptions.Auto);
                //client.AuthenticationMechanisms.Remove("XOAUTH2");
                await client.AuthenticateAsync(credentials);
                //await client.SendAsync(emailMessage).ConfigureAwait(false);
                //await client.DisconnectAsync(true).ConfigureAwait(false);
                //RedirectToAction ("sent");
            }
Hope someone can give me a clue how to fix that...
Regards,
Poul Erik