Manual talk:$wgEnableEmail

From mediawiki.org
Latest comment: 7 years ago by 146.198.223.71 in topic Testing sending emails

SELinux causes Mail to fail silently[edit]

If you enable email, and it's not working, you might want to check the Security Enhanced Linux (SELinux) settings in RHEL6, Scientific Linux, etc. to find out if the webserver is allowed to send email. If it's not, you'll get failures but without any helpful information on why mail is not working.

/usr/sbin/getsebool httpd_can_sendmail
httpd_can_sendmail --> off

Allow Apache to send email, using -P to persist the setting across reboots:

setsebool -P httpd_can_sendmail 1

Testing sending emails[edit]

Hi there. I just installed 1.26.2, and I suspect that I can't send email on my server (getting "Mailer returned: Unknown error in PHP's mail() function." when creating a user). Excuse my ignorance, but how do I test this hypothesis please? Would be great if this were documented, or even better if mw-config/index.php auto-detected this problem, with the help of the user, if necessary. Thanks. 146.198.223.71 20:19, 18 May 2016 (UTC)Reply

Solved and documented, thanks. 146.198.223.71 23:51, 21 May 2016 (UTC)Reply