Re: Newbie mail () question

From: Date: Fri, 22 Nov 2002 17:36:53 +0000
Subject: Re: Newbie mail () question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-125634@lists.php.net to get a copy of this message
I have just built a simple formmail script that validates certain fields and then if alls well mails the information to the client's email addressand displays some confirmatin html. This is all fine except for one minor issue. When I collect the email to check it looks OK etc the header From : in Outlook Express gives the www.servername.com Can I personalise this a bit to display the From: as the email address that the user has supplied i.e $Email I'm v. new to this so any help appreciated!
Try this: //...snip $headers="From: $name <$email>\r\n"; mail($recipient, $subject, $message, $headers); //...end The above code seems to work for me. -- Kyle Gibson admin(at)frozenonline.com http://www.frozenonline.com/

« previous php.general (#125634) next »