Git Product home page Git Product logo

Comments (9)

rajumsys avatar rajumsys commented on July 19, 2024 1

So it turns out, there is a very quick & easy solution. buddypress developers already made it possible to ignore their own implementation of wp_mail and fallback to wordpress's default wp_mail (which will allow sparkpost plugin to do its magics). If you add the following snippet (functions.php of your theme or similar), it should just work.

add_filter('bp_email_use_wp_mail', function() {
  return true;
});

from wordpress-sparkpost.

PetervLeeuwen avatar PetervLeeuwen commented on July 19, 2024 1

Thank you so much for investigating this for me.
This is working great!
All the email is sent over sparkpost now.

from wordpress-sparkpost.

cdaniel09 avatar cdaniel09 commented on July 19, 2024 1

@rajumsys This is perfect - I looked for 3 days on this solution, you are magic!

from wordpress-sparkpost.

MichaelPereiraUK avatar MichaelPereiraUK commented on July 19, 2024

This seems to be an incompatibility with the way BuddyPress handles emails, and SparkPost implements it's SMTP settings.

What SparkPost does is extend the PHPMailer class and then overwrite a global $phpmailer variable with this new class.

https://github.com/SparkPost/wordpress-sparkpost/blob/master/sparkpost.class.php#L102-L109

However BuddyPress instantiates a new instance of PHPMailer when it's dealing with emails.

https://github.com/buddypress/BuddyPress/blob/master/src/bp-core/classes/class-bp-phpmailer.php#L28-L37

So it doesn't look like they're compatible at the moment.

from wordpress-sparkpost.

richleland avatar richleland commented on July 19, 2024

Closing as dupe of #31 - let's continue discussion there.

from wordpress-sparkpost.

MichaelPereiraUK avatar MichaelPereiraUK commented on July 19, 2024

@richleland - BuddyPress ≠ bbPress

It seems the bbPress issue is just when using the API as it uses BCC.

This issue is that BuddyPress creates a new instance of the PHPMailer class and then does it's emails. While this plugins implementation is to grab the global $phpmailer variable and replace it with an instance of it's own class, which is simply discarded in the BuddyPress implementation.

from wordpress-sparkpost.

richleland avatar richleland commented on July 19, 2024

Oh I totally misread that - thanks for the clarification.

from wordpress-sparkpost.

rajumsys avatar rajumsys commented on July 19, 2024

Given there is another report of this problem, I'll investigate this soon.

from wordpress-sparkpost.

PetervLeeuwen avatar PetervLeeuwen commented on July 19, 2024

Oke thanks, i look forward to hear from you.

from wordpress-sparkpost.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.