CC Signup email to admin

Discussion in 'Troubleshooting' started by bfritton, Nov 19, 2010.

  1. bfritton

    bfritton Certified aMember Developer

    Joined:
    Oct 26, 2009
    Messages:
    54
    Hi All,
    I feel stupid but I can't find the answer to this anywhere on the forums or an option in admin.

    Can I carbon copy the signup email only to the admin email address?

    I know I can send admin a message on every subscription completion (payment) but I only want it to email the admin on the first subscription completion (signup with payment).

    Thanks much for any guidance.
  2. alexander

    alexander Administrator Staff Member

    Joined:
    Jan 8, 2003
    Messages:
    6,279
    This can be done as customization.
    Edit /amember/common.inc.php and change this:
    PHP:
    function mail_signup_user($member_id){
        global 
    $db$config;
        
    $u $db->get_user($member_id);
        
    $pl $db->get_user_payments($u['member_id'], 1);
        
    $u['name'] = $u['name_f'] . ' ' $u['name_l'];
        
    ////////////
        
    $t new_smarty();
        
    $t->assign('login'$u['login']);
        
    $t->assign('pass',  $u['pass']);
        
    $t->assign('name_f'$u['name_f']);
        
    $t->assign('name_l'$u['name_l']);
        
    $t->assign('user'$u);
        
    $t->assign('payment'$pl[0]);
        
    ///////////////////////////////////
        
    $et = & new aMemberEmailTemplate();
        
    $et->name "send_signup_mail";
        
    $et->product_id $pl[0]['product_id'] ? $pl[0]['product_id'] : null;
        
    mail_template_user($t$et$u);
    }
    to
    PHP:
    function mail_signup_user($member_id){
        global 
    $db$config;
        
    $u $db->get_user($member_id);
        
    $pl $db->get_user_payments($u['member_id'], 1);
        
    $u['name'] = $u['name_f'] . ' ' $u['name_l'];
        
    ////////////
        
    $t new_smarty();
        
    $t->assign('login'$u['login']);
        
    $t->assign('pass',  $u['pass']);
        
    $t->assign('name_f'$u['name_f']);
        
    $t->assign('name_l'$u['name_l']);
        
    $t->assign('user'$u);
        
    $t->assign('payment'$pl[0]);
        
    ///////////////////////////////////
        
    $et = & new aMemberEmailTemplate();
        
    $et->name "send_signup_mail";
        
    $et->product_id $pl[0]['product_id'] ? $pl[0]['product_id'] : null;
        
    mail_template_user($t$et$u);
        
    mail_template_admin($t$et);
    }

Share This Page