0

Hi all,
I use a form to contact with an user and then I need to send data in my e-mail

My code is :

$myemail = "a@hotmail.com";
mail($myemail, $subject, $message, $from);

But when I run my site I take this warning
mail() [function.mail]: "sendmail_from" not set in php.ini or custom "From:" header missing in see in my e-mail I don't have new e-mail.

And when I see in my email box I don't have new.

Could someone help me ??

Thanks a lot

3
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by Josh Connerty
0

Took from the php manual:

Note: When sending mail, the mail must contain a From header. This can be set with the additional_headers parameter, or a default can be set in php.ini.
Failing to do this will result in an error message similar to Warning: mail(): "sendmail_from" not set in php.ini or custom "From:" header missing. The From header sets also Return-Path under Windows.

Conclusion: You haven't configured it in your php.ini file :)

0

You can however do this in the mail function.

Your from variable, we haven't got it can you show us it so as we know what you are doing with it.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.