the php mail function is as follows:
Quote:mail (string to, string subject, string message [, string additionalheaders [, string additionalparameters]])
If you print view the full headers of a email you have received you will see all the options that can go in the "additional_headers" section, for example: From, X-Sender, X-Priority, Return-Path, cc, bcc, etc.
for example:
Quote:
/* recipients */
$recipient .= "santa@north-pole.com";
/* subject */
$subject = "Xmas List";
/* message */
$message .= "This is a simple mail example\n";
/* additional header pieces for errors, From cc’s, bcc’s, etc */
$headers .= "From: Birthday Reminder <birthday@php.net>\n";
$headers .= "X-Sender: <birthday@php.net>\n";
$headers .= "X-Mailer: PHP\n"; // mailer
$headers .= "X-Priority: 1\n"; // Urgent message!
$headers .= "Return-Path: <birthday@php.net>\n"; // Return path for errors
/* If you want to send html mail, uncomment the following line */
// $headers .= "Content-Type: text/html; charset=iso-8859-1\n"; // Mime type
$headers .= "cc: birthdayarchive@php.net\n"; // CC to
$headers .= "bcc: birthdaycheck@php.net, birthdaygifts@php.net"; // BCCs to
/* and now mail it */
mail($recipient, $subject, $message, $headers);
Hope this is useful
Enter your message below
Sign in or Join us (it's free).