Skip to:
Content
Pages
Categories
Search
Top
Bottom

send a copy of private message between users to admin


  • klubnika74
    Participant

    @klubnika74

    I have an online learning site and I need to be able to receive a copy of the email a student (user) sends to the instructor (another user). I found this code but have no idea which file to paste it in. Some guidance (file name and place in the file) greatly appreciated! This code is from earlier reply 2 years ago: https://buddypress.org/support/topic/send-a-copy-of-every-message-to-admin/

    My WordPress version is 4.9.2 and BuddyPress version is 2.9.2

    function arc_wp_mail_filter( $args ) {

    $args[‘headers’][] = ‘Bcc: <admin@yoursite.com>’;

    $new_wp_mail = array(
    ‘to’ => $args[‘to’],
    ‘subject’ => $args[‘subject’],
    ‘message’ => $args[‘message’],
    ‘headers’ => $args[‘headers’],
    ‘attachments’ => $args[‘attachments’]
    );

    return $new_wp_mail;
    }
    add_filter( ‘wp_mail’, ‘arc_wp_mail_filter’ );

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hi @klubnika74

    BuddyPress doesn’t allow a user to email another user directly.
    You may be mixing this up with the email notification messages, that BuddyPress sends out.

    By “send a copy of private message between users”, are you specifically referring to the Private Messages feature within BuddyPress?


    klubnika74
    Participant

    @klubnika74

    Yes. There is a feature in BuddyPress where one user can send a private email to another user. Since my site is an online training site, I set it up such that my students can email privately to the course teacher (I use Social Learner theme). The problem is that course teacher do not always respond to emails and I need to be able to follow up to make sure that my students get their answers.

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar