Re: mail prob

From: Date: Fri, 23 Feb 2001 05:56:34 +0000
Subject: Re: mail prob
References: 1 2 3 4  Groups: php.general 
Request: Send a blank email to php-general+get-41265@lists.php.net to get a copy of this message
From: "W.D." <suedeuno@yahoo.com> > I'm using a remote host, and when I call mail() with all the var's pulling > values from form fields, it still shows as nobody in from header. Is this a > server situation? Theyre using php4 support and they claim its that I'm not > using appropriate variables in the function. > > You have to set the From header manually: <?php $to = "who@where.com"; $from = "me@myserver.com"; $subject = "Blah"; $body = "Lorem ipsum dolor sit amet."; mail($to, $subject, $body, "From: $from"); ?> http://www.php.net/manual/en/function.mail.php Regards Simon Garner

« previous php.general (#41265) next »