• Resolved Divan

    (@divan-web-devine)


    Hi there,

    Is it possible to change the email address, to which the email notifications are sent (i.e. when someone registers on the website, changes their password, etc.)?

    If not, please let me know if there’s a specific plugin we need to use for this purpose, as the client wants to use a different email address per user role/type that registers on the website. Currently there are two different user roles/types, being “Vendors” and “Students”. When “Vendors” registers on the website, a specific person (email address) should be notified, and the same goes for “Students”.

    Thank you in advance for your feedback.

    Regards,
    Divan

    • This topic was modified 1 year, 10 months ago by Divan.

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @divan-web-devine

    Ultimate Member is using the wp_mail function which you can use its filter hook to modify the email headers for additional recipients.

    e.g.

    
    add_filter('wp_mail','custom_mails', 10,1);
    
    function custom_mails($args)
    {
    $bcc_email = sanitize_email('example@abc.com)';
    $cc_email = sanitize_email('example1@abc.com');
    
    if (is_array($args['headers'])) {
    $args['headers'][] = 'Bcc: '.$bcc_email ;
    $args['headers'][] = 'cc: '.$cc_email;
    }
    else {
    
    $args['headers'] .= 'Bcc: '.$bcc_email."\r\n";
    $args['headers'] .= 'cc: '.$cc_email."\r\n";
    }
    
    return $args;
    }
    

    Regards,

    Thread Starter Divan

    (@divan-web-devine)

    Thank you, Champ.

    I appreciate your feedback.

    Regards,
    Divan

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Change Notification Email Address’ is closed to new replies.