How can I set the sender (the From field in a email program) in a PHP script with the mail( ) function.
Any help is much appriciated!
| SitePoint Sponsor |




How can I set the sender (the From field in a email program) in a PHP script with the mail( ) function.
Any help is much appriciated!





Well the the mail() function takes three parameters and one optional
mail("to", "subject", "body") are the mandatory params and you can add a fourth optional like:
mail("to", "subject", "body", "From: webmaster@somewhere.net")
Please don't PM me with questions.
Use the forums, that is what they are here for.




Thanks!
Christophe
Bookmarks