When developing an on-line quotation form, an employment application a feedback form, or any form for that matter, the boss sometimes wants the forms content to not only be e-mailed to the intended person in a department but he/she also wants to receive it as a Copy: (cc), a Blind Carbon Copy: (bcc) or just be included in the To: List. Here are some tips on how that might be coded using PHP.
// To: List
// prepare the Subject, Body and Header separately.
// Everyone in this list receives the form's output.
//
$recipient= "Ronald Ducon <ronald@hobby-files.com>,Phil Utopia <phil@utopiamate.net>,Norm Jurgen <norm@17designs.com>";
$mail_sent = mail($recipient, $emailSubject, $emailBody, $emailHeader);
// CC:
$emailHeader = "From: $emailFrom\n"
. "MIME-Version: 1.0\n"
. "Content-Type: text/html; charset=\"ISO-8859-1\"\n"
. "Content-Transfer-Encoding: base64\n"
. "Cc: creative@17designs.com\n"
. "\n";
// Send e-mail and store returned value in variable
$mail_sent = mail($recipient, $emailSubject, $emailBody, $emailHeader);
// For Bcc use the immediate code above and replace Cc w/ Bcc
Enjoy!





