Jump to content

Mail funtion is working but not getting email.


denoteone

Recommended Posts

I have a test mail function that is echoing to the screen that it was successful. But I am not getting the email. This is a new server set up. but below is my email script and the the settings from my php.ini file.  Does it look like I am missing anything?

 

<?

// ---------------- SEND MAIL FORM ----------------

// send e-mail to ...
$to="me@localhost";

// Your subject
$subject="Test";

// From
$header="from: your name <your email>";

// Your message
$message="Hello \r\n";
$message.="This is test\r\n";
$message.="Test again ";

// send email
$sentmail = mail($to,$subject,$message,$header);

// if your email succesfully sent
if($sentmail){
echo "Email Has Been Sent .";
}
else {
echo "Cannot Send Email ";
}

?>

 

php.ini

sendmail_path = /usr/sbin/sendmail -t -i
sendmail_from = [email protected]

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.