Ok, I had a quick look at the code and did a test run.
It was failing within SmtpBuilder.cs on this line:
client.Connect(
emailAccount.Host,
emailAccount.Port,
emailAccount.EnableSsl ? SecureSocketOptions.SslOnConnect : SecureSocketOptions.StartTlsWhenAvailable);
For everyone running office365/exchange online, you should have the SSL unchecked in nop which will use TLS secure socket where possible. This should work with the following configuration:
Host: smtp.office365.com
Port: 587
SSL: unchecked
Use default credentials: false
Working for my environment using the current referenced libary MailKit 2.6 and the latest MailKit 2.9.
IMO, I believe the email Admin in nop should allow the user to select any of the SecureSocketOptions enum options to cater for any scenario but the default should be TLS moving forward.
It was failing within SmtpBuilder.cs on this line:
client.Connect(
emailAccount.Host,
emailAccount.Port,
emailAccount.EnableSsl ? SecureSocketOptions.SslOnConnect : SecureSocketOptions.StartTlsWhenAvailable);
For everyone running office365/exchange online, you should have the SSL unchecked in nop which will use TLS secure socket where possible. This should work with the following configuration:
Host: smtp.office365.com
Port: 587
SSL: unchecked
Use default credentials: false
Working for my environment using the current referenced libary MailKit 2.6 and the latest MailKit 2.9.
IMO, I believe the email Admin in nop should allow the user to select any of the SecureSocketOptions enum options to cater for any scenario but the default should be TLS moving forward.
Thank you Jayc, your suggestions on SSL (Unchecked) and Use default credentials (Unchecked) worked on Office 365.
Are you getting emails from Contact Us form? We are getting 'SendAsDeniedException.MapiExceptionSendAsDenied' error.
Thank you,
Anup