In this article I will explain and provide solution for the possible errors (exceptions) occurring while sending email with MailKit in .Net.
.Net MailKit Error: 5.7.9 Application-specific password required
MailKit.Net.Smtp.SmtpCommandException: 5.7.9 Application-specific password required.
.Net MailKit Error: Authentication failed
MailKit.Net.Smtp.SmtpCommandException: Authentication failed.
.Net MailKit Error: 5.7.8 Username and Password not accepted
MailKit.Net.Smtp.SmtpCommandException: 5.7.8 Username and Password not accepted.
.Net MailKit Error: An attempt was made to access a socket in a way forbidden
System.Net.Sockets.SocketException: An attempt was made to access a socket in a way forbidden by its access permissions 00.000.000.000:25
.Net MailKit Error: sender@gmail.com No such user here
MailKit.Net.Smtp.SmtpCommandException: sender@gmail.com No such user here
.Net MailKit Error: 5.7.0 Authentication Required
MailKit.ServiceNotAuthenticatedException: 5.7.0 Authentication Required.