denoteone Posted March 31, 2010 Share Posted March 31, 2010 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] Link to comment https://forums.phpfreaks.com/topic/197110-mail-funtion-is-working-but-not-getting-email/ Share on other sites More sharing options...
ignace Posted March 31, 2010 Share Posted March 31, 2010 $to="me@localhost"; Do you have a mail server running on your client? Link to comment https://forums.phpfreaks.com/topic/197110-mail-funtion-is-working-but-not-getting-email/#findComment-1034683 Share on other sites More sharing options...
denoteone Posted March 31, 2010 Author Share Posted March 31, 2010 service sendmail status sendmail is stopped. Is there anyway I can specify an external mail server? Link to comment https://forums.phpfreaks.com/topic/197110-mail-funtion-is-working-but-not-getting-email/#findComment-1034690 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.