MyBB Community Forums

Full Version: mail not working
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I'm using yahoo web hosting suspect a windows server and mail does not work at all with mybb. I get no error messages.
Any Ideas?
Have you tried a script to test if the mail functionality works on the server? The following should do it.. Upload it to your server and call it via your browser.

<?php

if($_POST['email'])
{
	mail($POST['email'], "Test Message", "Hi, this message is testing if mail functionality works on your server.");
	echo "Email Sent<br />";
}
?>
<form method="post" action="<?php echo $_SERVER['PHP_SELF'];?>">
Email Address: <input type="text" name="email" />
<br />
<input type="submit" value="Send" />
</form>
you got an typo in the script, Chris. That won't sent to the correct adress if set to it.

$POST['email'] in the mail wrapper, should be $_POST['email']

and you can do this instead, so you really can see if it was sent or not.

if(mail($_POST['email'], "Test Message", "Hi, this message is testing if mail functionality works on your server.")) {
    echo "Email Sent<br />";
} else {
    echo "Email not sent<br />";
}
Yeah I tried that and it worked perfect. Is there something maybe in the config that may have been written to incorrectly?
Hey check it out! I got to lookin at yahoo's hosting setup and realized that unless the "from" email address was the admin email, ([email protected]) mail() doesn't quite work correctly. I wiped the whole install and reinstalled and it works perfectly.

Not a Mybb problem but a host problem. Might want to put that bit of information somewhere in case somebody else runs into the same problem
That's wierd, why would any host do an stupid thing like that, pointing all the emails back to an email which is hosted by the same server seems pointless and idiotic, oh well, good you found it out anyways.
It is idiotic I agree but the point is the all-mighty dollar. Its a dirt cheap host and you get 200 email addresses with it. They jack you on the end because I can't install my own mail server and get a million email adresses if I want. Anyway, thanks for the help and this software is great, the best I have found.