Jump to content

[SOLVED] What is wrong with this email?


phatgreenbuds

Recommended Posts

Below is my very simple code and the error message I get. I am a little unclear on the whole email setup...I did not have a php.ini file to begin with but edited the php.ini.dist file and renamed it to php.ini. I restarted apache and still get this error.  What did I miss?

ini_set("SMTP", 'x.x.x.x');
$to = '[email protected]';
$subject = "test email";
$message = "Blah Blah Blah";
$headers = 'From: [email protected]' . "\r\n";
mail($to, $subject, $message, $headers);
ini_restore("SMTP");

Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in E:\Program Files\Apache Group\Apache2\test\testmailer.php on line 7
Link to comment
https://forums.phpfreaks.com/topic/32247-solved-what-is-wrong-with-this-email/
Share on other sites

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.