Adding a BCC to the Email Message
Cartweaver uses a mail class that I wrote a while back that has a setBCC() method in it, but it was not used in Cartweaver. Basically, the sendMail() function in CWIncFunctions.php would have to be modified to take a BCC parameter:
// Send an email using the CWMail class
function sendEmail($to,$from,$subject,$text,$html=null) {
$email = new CWMail();
$email->setTo($to);
$email->setFrom($from);
$email->setSubject($subject);
$email->setText($text);
if($html) $email->setHtml($html);
$email->send();
}
to this:
// Send an email using the CWMail class
function sendEmail($to,$from,$subject,$text,$html=null, $bcc=null) {
$email = new CWMail();
$email->setTo($to);
$email->setFrom($from);
$email->setSubject($subject);
$email->setText($text);
if($html) $email->setHtml($html);
if($bcc) $email->setBCC($bcc);
$email->send();
}
Then, whereever you see the sendMail() function used, you could pass the 6th parameter, such as in CWFunConfirmEmails.php:
sendEmail($customerEmail,$companyEmail,$subject,$textMessage,$htmlMessage,$myBCC);