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,
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.