MyBB Community Forums

Full Version: Help!!can't send mail
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
i've posted a thread to ask this question. kind friends told me to contact the host and ask them to serve php mail service. but the problem remains. the host themselves don't know clearly what the problem is...SadSad

could anybody please tell me how to config the server side to support the mail service? help..

i use a simple php script to test, the code is:
<?php
echo "<html><body>";
mail ("[email protected]", "Subject", "Hello!");
echo "Sending mail...";
echo "</body></html>";
?>

problem is reported as below:
Warning: mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in D:\freehost\chuanchuan\web\test.php on line 3

mybb reports the same error when sending mails.

appreciate your help!

ps:really hope mybb supports smtp earllier...
MyBB 1.4 will support SMTP.

For your test mail script, PHP requires you to set the From: header.

The following would work:
<?php
echo "<html><body>";
mail ("[email protected]", "Subject", "Hello!", "From: [email protected]");
echo "Sending mail...";
echo "</body></html>";
?>

If that works, MyBB's mail functionality should also work fine.
thanks.that script doesnot work,either:

Warning: mail() [function.mail]: SMTP server response: 550 5.7.1 Unable to relay for [email protected] in D:\freehost\chuanchuan\web\test.php on line 3

<?php
echo "<html><body>";
mail ("[email protected]", "Subject", "Hello!", "From: [email protected]");
echo "Sending mail...";
echo "</body></html>";
?>

what's the problem?
Once again - you'll need to contact your web host to ensure their SMTP server is properly configured to relay mail to external sources.

This depends on which SMTP server they are using but is something they need to fix themselves.
ok,thanks very much.
problem is solved. thanks very much