Re: PHP mail function From header not working

From: Date: Thu, 13 Feb 2003 12:53:17 +0000
Subject: Re: PHP mail function From header not working
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-135435@lists.php.net to get a copy of this message
"Marco Alting" <marco@premiummedia.nl> wrote in message news:20030213085402.55100.qmail@pb1.pair.com... > When I try to use a php script, to send an email, the From header is > replaced by a senders email address of my provider. Is there any way to make > it so my email address shows up in the From header? > > In the script I used fake addresses, because of client privacy reasons... > > <? > $email = "toaddress@domain.com"; > $mailheaders = "From: My Name\n"; > $mailheaders .= "Reply-To: myEmail@domain.com\n\n"; > > $message2 ="MESSAGE GOES HERE"; > mail($email,"TITLE",$message2,$mailheaders); > ?> > > Are you running this on windows? If you are have a look at: http://www.php.net/manual/en/ref.mail.php The "sendmail_from" setting may be what you are looking for. You will need to set it using ini_set. Regards Lee

« previous php.general (#135435) next »