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:


$headers="From: $name <$email>\r\n";
mail($recipient, $subject, $message, $headers);


The above code seems to work for me.

Kyle Gibson

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to