Jump to content

Welcome, Guest!

By registering with us, you'll be able to discuss, share and private message with other members of our community.


BCC for all outgoing emails

Recommended Posts

If you want, to send a copy of all emails to yourself, you can use this override.

Just change the email address and save the file as Mail.php in override/classes folder. After uploading the file, you should delete the file cache/class_index.php on your server.

``` <?php

if (!defined('PSVERSION_')) exit;

class Mail extends MailCore {

// BCC Function
public static function Send(
    $toName = null,
    $from = null,
    $fromName = null,
    $fileAttachment = null,
    $modeSmtp = null,
    $templatePath = _PS_MAIL_DIR_,
    $die = false,
    $idShop = null,
    $bcc = null,
    $replyTo = null)
    // Make always an array
    if ($bcc && !is_array($bcc)) {
        $bcc = array($bcc);

    // Add BCC email
    $bcc[] = 'your_email@something.com';

    return parent::Send($idLang, $template, $subject, $templateVars, $to, $toName, $from, $fromName, $fileAttachment, $modeSmtp, $templatePath, $die, $idShop, $bcc, $replyTo);

} ```

Share this post

Link to post
Share on other sites

Great thing!

And yes, one of the long standing enhancement requests: https://github.com/thirtybees/thirtybees/issues/397

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...