SMTP Port is not working in office 365. Though it worked in Gmail by using app password, it's not working on office 365.
Email address: [email protected] Email display name: Store name Host: smtp.office365.com Port: 587 User: [email protected] Password SSL: checked Use default credentials: unchecked
Thanks in advance for any help.
I can share your frustration because your setup should in theory just work. I had the same configuration from 3.xxx to 4.2 and office365/Exchange Online emails worked flawlessly. Once I installed 4.3, the setup worked up to a point and then finally had a certificate error out of no where which everyone else has been complaining about.
As my nop website is hosted in Azure (I assume exchange online is too), I had set SSL unchecked and had no problems ever since. I haven't had time to investigate why, if its really a nopcommerce mailkit issue or some sort of environment amendments in Azure.
I do know Azure had notified of TLS certificate changes but I don't know if this impacts nop.
Thank you for your response. I have tried both in the localhost and in azure. However, it's not working at all. I also attempted by unchecking the SSL.
For us it is not working on Office 365 mail (our nopCommerce 4.3 hosting is on a VPS).
@monowar.mbstu, helped us a lot.
Finally we moved the email server to Zoho. The mails are working on both Zoho personal and Zoho professional email plans.
I think only way to figure out what is happening on Office 365 configuration is through debugging the source code and making changes to the settings of Mailkit code. This is the conclusion myself and @monowar.mbstu arrived on this issue.
Thanks all of you for supporting us on this issue.
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.