CC Admin on emails

Discussion in 'Troubleshooting' started by trex, Dec 4, 2007.

  1. trex

    trex New Member

    Joined:
    Jun 26, 2007
    Messages:
    1
    Is there way to cc/copy admin on all emails sent to subscribers?

    For example, I would like to be notified as the admin whenever one of my subscribers has received an expiration email.

    Thank you
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    Modify this function in common.inc.php:
    function mail_template_user($t, $et, $u, $add_unsubscribe=false){
    global $db, $config, $_AMEMBER_TEMPLATE;
    $t->assign('config', $config);
    $et->lang = $u['data']['selected_lang'] ? $u['data']['selected_lang'] : get_default_lang();
    // load and find templated
    if (!$et->find_applicable()){
    trigger_error("Cannot find applicable e-mail template for [{$et->name},{$et->lang},{$et->product_id},{$et->day}]", E_USER_WARNING);
    return false;
    }
    $_AMEMBER_TEMPLATE['text'] = $et->get_smarty_template();
    $parsed_mail = $t->fetch('memory:text');
    unset($_AMEMBER_TEMPLATE['text']);
    mail_customer($u['email'], $parsed_mail,
    null, null, null, $add_unsubscribe,
    $u['name_f'] . ' ' . $u['name_l']);
    mail_admin($parsed_mail,null);
    }
  3. designlacky

    designlacky New Member

    Joined:
    Oct 21, 2007
    Messages:
    12
    Is there any way to have it only CC admin on specific emails?

    We're interested in getting the "Credit Card Rebill Failed" and other rebilling related emails to go to admin. Possible?
  4. terriz

    terriz Member

    Joined:
    Nov 17, 2003
    Messages:
    37
    I'd appreciate that function as well. As it is now, if someone fails on rebill, I don't have any way to learn about it unless I happen to look them up.

    Thanks,
    Terri Z

Share This Page