I am having issues with SMTP settings to office365. I have researched on the forum and phpmailer knowledgebase but couldn’t find a way to fix it.
Just some ways I have tried…
In the settings, I have tried TLS and SSL. Tried port 587 with TLS and other combinations with no luck.
Replaced class.phpmailer.php and class.smtp.php
Changed phpmailer logging to error report to see the connection status.
Tried using ‘Microsoft Exchange’ and ‘Other’ to put in the details.
All field (server addr, username, password, port, SSL/TLS) were being typed in every single try
All credentials are 100% correct as in inbound email setting, it works.
Server is using TLS v1.2
Tried to use CPanel local mail account, it works, sends out email.
In log, I can see connection opened, but server returned 220-We do not authorize the use of this system to transport unsolicited, and/or bulk e-mail.
Would anyone please give me a hint on how to get it work?
As a reference for those who are experiencing this issue with Office365 I’ll share the solution what worked for me.
Background: I found this issue occurs when you are hosting your CRM o domain different to the one you have setup on your Office365. (That’s my case at least).
To solve it you either add your CRM domain to your Office365.
If for some reason you are not allow to do it, the workaround is to modify the sugar library that creates the emails on SuiteCRM (Thanks to @R3xMan). To do so you need to modify file \include\SugarPHPmailer.php from