Warning: mail(): "sendmail_from" not set in php.ini

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
geethalakshmi
Forum Commoner
Posts: 31
Joined: Thu Apr 24, 2008 10:38 pm

Warning: mail(): "sendmail_from" not set in php.ini

Post by geethalakshmi »

Hi,

When i tried to send mail from localhost, i received an error stating it:

Code: Select all

Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing in
But it works in the server.

Pls help!

-Geetha
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Re: Warning: mail(): "sendmail_from" not set in php.ini

Post by jayshields »

Either set your sendmail_from value in php.ini or specify a "From: whatever.com\r\n" in the header parameter of the mail() call.
Post Reply