Posted by "AK" on 01/20/06 00:56
----- Original Message -----
From: "Thomas Bonham" <email@example.com>
Sent: Thursday, January 19, 2006 12:40 PM
Subject: [PHP] Email Form
> Hello All,
> I don't remember how to do email with php. I have all of it done, except
> for I can't get it to show the senders email address. All I get it from
> If some one has a example that they can post that would be great.
> Thank You
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
Example 2. Sending mail with extra headers.
The addition of basic headers, telling the MUA the From and Reply-To
$to = 'firstname.lastname@example.org';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: email@example.com' . "\r\n" .
'Reply-To: firstname.lastname@example.org' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
[Back to original message]