0

My server was upgraded by the company recently. There are 17 sites of mine on it. The ones using wordpress are sending out PHP mail normally but the from address is that of the server company and not the one stated.

The standard PHP mail function however in many of my others sites including one on mission critical today is not sending the email. Most are complicated but I have set up a simple test that won't send either.

<?php $to = "<--- my address --->";
                $subject = "Test mail";
                $message = "Hello! This is a simple email message.";
                $from = "someonelse@example.com";
                $headers = "From:" . $from;
                mail($to,$subject,$message,$headers);
                echo "Mail Sent.";?>

What could be the reason that this isn't working.

4

0 回答 0