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 .= "
[email protected]";
/* 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 <[email protected]>\n";
$headers .= "X-Sender: <[email protected]>\n";
$headers .= "X-Mailer: PHP\n"; // mailer
$headers .= "X-Priority: 1\n"; // Urgent message!
$headers .= "Return-Path: <[email protected]>\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: [email protected]\n"; // CC to
$headers .= "bcc: [email protected], [email protected]"; // 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).