Skip to:
Content
Pages
Categories
Search
Top
Bottom

Forum Replies Created

Viewing 1 replies (of 1 total)
  • @whoweez

    Participant

    Hi @djpaul,

    I’m playing around with the above code, but adding it to the functions.php file does not prohibit the buddypress email from sending!?

    Furthermore, using sendgrid’s plugin and provided transactional template ID field does not solve anything as only the template without any buddypress/or wordpress related email content is sent – due to no relational placeholders set.

    My aim is to use a custom transactional template at sendgrid for all wordpress and buddypress related content, but from some of your conversations on this I thought “__return_false” on “bp_email_use_wp_mail” should prohibit any BP emails from being sent in the first place as the new class should handle the email sending process…?

    Could you perhaps give more guidelines as to why buddypress emails are still sending with this implemented:

    add_filter( 'bp_email_use_wp_mail', '__return_false' );
    add_filter( 'bp_send_email_delivery_class', function( $delivery_class ) { 
        return 'Implementwpemailbp'; 
    } );
    class Implementwpemailbp implements BP_Email_Delivery{
      public function bp_email(BP_Email $email){
      //add_filter('wp_mail_content_type', 'set_html_content_type');
    
      //wp_mail($to, $subject, $message, $headers = '', $attachments = array())
    
      //remove_filter('wp_mail_content_type', 'set_html_content_type');
      var_dump($email);
      }
    }

    Really appreciate your help 🙂

    Kind Regards,
    Wzz

Viewing 1 replies (of 1 total)
Skip to toolbar