BuddyDev

Search

[Resolved] How to Disable all BuddyPress Emails via PHP

Tagged: 

  • Participant
    Level: Enlightened
    Posts: 23
    Jkk on #34498

    Dear Buddydev,

    How can we disable all buddypress emails and third plugin such as follower/following emails trought PHP?
    Waiting your reply.

    Kind regards,
    Jkk

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #34504

    Hello Jkk,

    Please try plugin “Disable Emails” by WebAware and use the following code.

    
    add_filter( 'bp_email_use_wp_mail', '__return_true' );
    
    

    Please let me know if it works or not.

    Regards
    Ravi

  • Participant
    Level: Enlightened
    Posts: 23
    Jkk on #34513

    Hi Ravi,

    Thank you for the suggestion.
    But is there a method without using plugin?
    Thanks in advance.

    Kind regards,
    jkk

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #34516

    Hello Jkk,

    Try the following code.

    
    
    if ( ! function_exists( 'wp_mail' ) ) {
    	function wp_mail($to, $subject, $message, $headers = '', $attachments = array()) {}
    }
    
    

    Regards
    Ravi

    • This reply was modified 4 years, 1 month ago by Ravi.
  • Participant
    Level: Enlightened
    Posts: 23
    Jkk on #34519

    Hi Ravi,

    Thank you for the reply.
    This function will disable all wordpress email or just the buddypress email?
    Thanks in advance.

    Kind regards,
    jkk

  • Keymaster
    Level: Yogi
    (BuddyDev Team)
    Posts: 3115
    Ravi on #34524

    Hello Jkk,

    It will disable all WordPress emails.

    Regards
    Ravi

  • Participant
    Level: Enlightened
    Posts: 23
    Jkk on #34527

    Hi Ravi,

    thank you very much for the help.
    No method to exclude only the buddypress email via PHP?
    Thanks in advance.

    Regards
    jkk

The topic ‘ [Resolved] How to Disable all BuddyPress Emails via PHP’ is closed to new replies.

This topic is: resolved