I'm developing a web-based email client for sending MIME emails. I've been trying to create a script to send emails with BCCs but I can't seem to make it work. I thought I just need to add a BCC header but it still doesn't work.
Below is my email header that i use with the mail() function:
$headers = "";
$headers .= "From: $SenderName <$SenderAddress>\n";
$headers .= "X-Sender: <$SenderAddress>\n";
$headers .= "X-Mailer: PHP Mailer\n";
$headers .= "X-Priority: $PriorityLevel\n";
$headers .= "Return-Path: <$SenderAddress> \n";
if ($MailType == "HTML") {
$headers .= "Content-Type: text/html; charset=iso-8859-1\n";
}
if ($ToBCC == "ToBccTRUE") {
$headers .= "Bcc: $ToEmail\n";
}