MyBB Community Forums

Full Version: MyBB was unable to send the email using the PHP mail() function.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
MyBB was unable to send the email using the PHP mail() function

using this function php mail() works.
<?

$from = "From: test <[email protected]>";

$to = "[email protected]"; 

$subject = "Hi! ";

$body = "TEST";



if(mail($to,$subject,$body,$from)) echo "MAIL - OK";

else echo "MAIL FAILED";
?>

attachement my mail setting
That would be from using an improper mail header. You could probably just leave the additional mail headers setting blank. The from header is set by the return email setting under Config->Site Details.
(2019-02-10, 01:21 AM)dragonexpert Wrote: [ -> ]That would be from using an improper mail header. You could probably just leave the additional mail headers setting blank. The from header is set by the return email setting under Config->Site Details.

solved your php mail() function check admin mail if admin mail id and entered mail id in mail setting are different issue occured