Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Specifying sendmail_from within script...

Status
Not open for further replies.

HarryVincent

Programmer
Feb 22, 2005
4
US
I have a page setup that sends mail using the php mail() function. However, I don't have access to php.ini and would like to override the "FROM" setting that users see when they get the e-mail.

Currently, when someone gets an e-mail from my site the FROM header reads "CGI Mailer" Is there a way to use "sendmail_from" within my php code to change this?

I tried adding this before calling mail():

$headers = "From: myemail@mydomain.com\nReply-To: myemail@mydomain.com"

But that didn't have any effect on the resulting e-mail. It would be nice to have a real reply-to address show up -- any way to do it?
 
You can try using the fifth parameter to the mail() functions and set it to something like '-f myemail@mydomain.com'

Ken
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top