I am having problems with sending email authenticated by office 365. I have edited the email settings in config.inc with the SMTP office 365 settings and even then the email is not sent.
The OJS keeps trying to send the email. But it does not. The only error that is generated is timeout.
the e-mail settings are configured as below:
; Use SMTP for sending mail instead of mail()
smtp = On
Which version of the OJS are you using? There are some changes (I believe in the 3.1.2), I have not yet tested, but with previous version I was not able to get it working:
Did anyone solve the problem?
I also encountered the same problem and it was killing me for more than 5 days. Anyway, the problem is solved for my case.
I have edited the Mail.inc.php file to see the ErrorLog file (@ /var/log/apache2/error.log) and found that âdefault_envelope_senderâ (sender email as your smtp host email) was not set to $f[âemailâ]); variable even it is assigned in the âconfig.inc.phpâ file.
$f[âemailâ] = Config::getVar(âemailâ, âdefault_envelope_senderâ);
This line can not detect the âdefault_envelope_senderâ from âconfig.inc.phpâ file. So,
$mailer->SetFrom($f[âemailâ], $f[ânameâ]);
this line can not set the FROM email address correctly. It takes the admin email address which was set to admin account.
So, I changed the admin email account e-mail address to my SMTP host email address and the system was working for smtp.office365.com setting.
Hope this may help to those who are facing the same problem still now.
; Use SMTP for sending mail instead of mail()
smtp = On
This will depend on your specific version of OJS, but in the current release (OJS 3.1.2) to always set the envelope sender on your outgoing mail, the required configuration settings in config.inc.php are all four of these:
I believe that we need a âfrequent issuesâ or a wiki where such issues and explanations would be published. I was recently struggling with the same problem with office365 and was unable to figure it out by myself that DMARC settings should be forced.
This would make a good entry. Honestly, I think the primary reason I havenât written it up yet is because I donât like our current configuration variables and hope to simplify them.