BuddyDev

Search

[Resolved] Disable New User Registration, Friend request etc. Email notification

  • Participant
    Level: Enlightened
    Posts: 146
    Dandy Jefferson on #3428

    Hi,
    Thanks for answering last topics I asked. I emailed to Brajesh but he seems like very busy not replying me. So, I have to ask here.

    I just wonder that is there any way to disable Email notification which sent automatically when New User Registration, Friend Request etc.? Because in my site, it’s no need to send email notification.

    Thank you very much.

  • Keymaster
    (BuddyDev Team)
    Posts: 21489
    Brajesh Singh on #3429

    Hi Dandy,
    I am sorry, I was having some issues and could not reply back.

    Please put the following code in your bp-custom.php

    
    //force BuddyPress to use wp_mail
    add_filter( 'bp_email_use_wp_mail', '__return_true');
    //override wp_mail
    if ( ! function_exists( 'wp_mail' ) ) :
        function wp_mail( $to, $subject, $message, $headers = '', $attachments = array() ) {
            //don't do anything
        }
    
    endif;
    
    

    It will stop all email. After you are done with importing, please make sure to remove the code snippet.

    Thank you
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 146
    Dandy Jefferson on #3441
    This reply has been marked as private.
  • Keymaster
    (BuddyDev Team)
    Posts: 21489
    Brajesh Singh on #3442

    Hi Dandy,
    Please disable the above code and WordPress email will start working.

    To disable the notifications for BuddyPress, we have a small plugin
    https://buddydev.com/plugins/bp-default-email-notification-settings-control/

    Please use it. It will start taking preference for new users. To update for existing users, Please use the button at the bottom of settings page of this plugin and It will set the preference for all users.

    Hope that helps. Please do let me know if it works for you or not?

    Thank you
    Brajesh

  • Participant
    Level: Enlightened
    Posts: 146
    Dandy Jefferson on #3445

    Hi, Brajesh
    Thanks for your reply.

    The plugin is exactly what I need and it works perfectly as I expected.

    Thanks a million for your help and hope you have a good day!

  • Keymaster
    (BuddyDev Team)
    Posts: 21489
    Brajesh Singh on #3453

    Hi Dandy,
    Thank you.
    have a great day to you too.

    Regards
    Brajesh

You must be logged in to reply to this topic.

This topic is: resolved