MyBB Community Forums

Full Version: Documentation Discrepancy - inc/functions.php
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Getting a mail error when users register on my forum, http://forum.vancouverairsoftoperations.com

"MyBB was unable to send the email using the PHP mail() function." comes up in the mail log.

Gone through some basic troubleshooting, PHP is enabled with my host, however I've run into an inconsistency with the MyBB documentation.

Quote:Host Restrictions
Some webhosts place restrictions on PHP mail. For example, some require that the From
address be an address configured on their server; other hosts may disable the PHP mail function completely.Check with your webhost if there are any restrictions in place for sending mail via PHP.
If your webhost only allows sites to send mail from their own domain, edit the file inc/functions.php
to try a workaround fix.
Find: php mail($to, $subject, $message, $headers);
Add before:
php ini_set("sendmail_from", "[email protected]");
The final result of the edit should be:
php ini_set("sendmail_from", "[email protected]"); mail($to, $subject, $message, $headers);

When I pull up my inc/functions.php, the referenced code can't be found in it. How am I supposed to apply the workaround?