Tom Muck

Alpha Dog Blues Band
Home page
All articles
All Extensions | Extension News | Extension FAQs | Customer Login
Books authored or co-authored by Tom Muck
Extensions, books, and other products | Customer Login
Your current cart contents
Tom-Muck.com Blog | CMXTraneous Blog | Flash Remoting Blog
About the site

Bcc

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);

Back to Cartweaver PHP FAQ, code changes, and samples

Pay me securely with your Visa, MasterCard, Discover, or American Express card through PayPal!
Pay me securely with your Visa, MasterCard, Discover, or American Express card through PayPal!
About | Privacy Policy | Contact | License Agreement | ©2002-2025 Tom Muck | Dreamweaver Extensions