Git Product home page Git Product logo

Comments (14)

rajumsys avatar rajumsys commented on July 19, 2024

Hello @cfk4spk
Thanks for reporting. We'll investigate this issue for you and will follow up.

from wordpress-sparkpost.

rajumsys avatar rajumsys commented on July 19, 2024

Following up about the issue, I see there is a reason why HTTP API not working. However, if it's the same issue, SMTP version should work. Have you tried SMTP?

from wordpress-sparkpost.

MichaelPereiraUK avatar MichaelPereiraUK commented on July 19, 2024

The cause of the issue may be similar to what I noted in #32

from wordpress-sparkpost.

cfk4spk avatar cfk4spk commented on July 19, 2024

Hi rajumsys -
Thank you for following up - my apologies for my delay in getting back to you . . .
I have been trying to get SMTP to work, but I'm having no luck - as I've been unable to get anything through that way.
I may be erring, and I will keep trying! I had THOUGHT that we 'needed' to use HTTP API for our scenario (see below), but I'm willing to try whatever may work for us!

Regarding MichaelPereiralUK's suggestion, I'm unsure whether it applies for me or not. I know that BuddyPress uses bbPress, but also that the two work differently, in some ways, at least. Unfortunately, I am not a programmer / developer, and I am not sure that I understand well enough to confirm or deny. I am happy to try anything -- and / or to provide any info that might be helpful -- if you / he can tell me what you'd like to see?!?

With Mandrill we used HTTP API --- and that led me to believe that I should be using HTTP API with SparkPost also. If I can / should be using SMTP, I am happy to make the change -- if I can figure out how.
Right now, my SMTP test emails tell me that they are sent successfully, but no emails are coming through, and my SparkPost 'report' does not show them at all --- and so far, I cannot get any emails to work through bbPress when SparkPost is set to SMTP.

SparkPost IS working for us -- using HTTP API --- for our bbPress forums . . . IF I do not update bbPress beyond version 2.5.3.
When I use bbPress2.5.3 -- the forum subscriptions work fine with SparkPost.

When I update bbPress to its current version: 2.5.8 --- the subscriptions no longer work (and they stopped at bbPress2.5.4).
The rest of our bbPress and other emailing needs seem to be working with SparkPost --- it is ONLY the bbPress subscription emails that do not work with SparkPost -- when bbPress is updated beyond version 2.5.3 (but this DOES work with Mandrill -- so I believe it is something within SparkPost that is killing it . . . please read on)

When bbPress was updated to version 2.5.4 -- one of the changes includes this:
(from bbPress2.5.4 includes->common-> functions.php):
" . . . we've moved away from 1 email per subscriber to 1 email with everyone BCC'd. This may have negative repercussions for email services that limit the number of addresses in a BCC field (often to around 500.) . . . "

I'm not sure if that is 'why' SparkPost works with version 2.5.3 and does not work with version 2.5.4 - 2.5.8 --- I am merely hoping to help provide info.
With Mandrill, we had needed to use what I called the "Sudar-Fix" -- with bbPress2.5.3 ---- but WITH that, Mandrill works with bbPress2.5.3
Mandrill also works with bbPress2.5.8 ("Sudar-Fix" no longer needed, as they apparently 'incorporated it' into bbPress core)


I will try here, to provide a few more details about our setup, in case it is helpful:

We have a fairly small, private organization of approx 250 members that uses bbPress forums (we do not use BuddyPress)
ALL 'New Topics' are emailed to ALL of our members.
No 'Replies' will be emailed to any member, unless they choose to "subscribe" to the topic.

All of that works with Mandrill
Some of it works with SparkPost ---- but SparkPost will not work for the "subscribe" portion - our 'reply' notifications do not go out.

Our setup:
SparkPost 2.2.1
WordPress 4.4.2 (and will be switching to WP4.5 as soon as our test site clears it for us)
bbPress 2.5.8 (topic subscription emails go through bbPress)
bbpnns 1.10 (https://wordpress.org/plugins/bbpress-notify-nospam/ --- this is how we 'force' all NewTopic notifications -- and this is working with SparkPost -- these notification emails go a different 'route' than the subscription emails)

Our site does use other plugins too, but I THINK these are the only relevant ones here.

To reiterate:
IF I "downgrade" bbPress --- and go back to using bbPress2.5.3 ---- THEN SparkPost DOES WORK --- for ALL of it - "subscriptions for reply notifications" also!

While it might seem logical to conclude that there is something 'wrong' with bbPress2.5.8 . . . .

my confusion continues because
. . . Mandrill works with bbPress2.5.3 and also with bbPress2.5.8
SparkPost works with bbPress2.5.3 but does NOT work with bbPress2.5.8

Please let me know what I can do to help. I would really like to get this working!
Thank you so much!

Chris

from wordpress-sparkpost.

cfk4spk avatar cfk4spk commented on July 19, 2024

addendum:
Please note: our 'forced' email notifications that go through bbpnns DO go through SparkPost for email service and they work fine.
When I wrote that they 'go a different route' I meant that they do not involve bbPress code for sending emails.

from wordpress-sparkpost.

MichaelPereiraUK avatar MichaelPereiraUK commented on July 19, 2024

@cfk4spk - I went ahead and downloaded 2.5.8 to look for a similar mailer implementation which is causing the issue with BuddyPress emails not sending and it seems not to be the case.

I'm guessing it's related to #23 which is what rajumsys is referring to as why SMTP should work.

Have you tried switching to SMTP and testing that sends before looking to see if the subscription emails send? Since the API key needs different permissions in that scenario.

from wordpress-sparkpost.

MichaelPereiraUK avatar MichaelPereiraUK commented on July 19, 2024

For any developers coming here, you could likely create a temporary solution for the HTTP mailer by manipulating the filters available towards the end of the subscription email function.

// Custom headers
$headers  = apply_filters( 'bbp_subscription_mail_headers', $headers  );
$to_email = apply_filters( 'bbp_subscription_to_email',     $no_reply );

do_action( 'bbp_pre_notify_subscribers', $reply_id, $topic_id, $user_ids );

// Send notification email
wp_mail( $to_email, $subject, $message, $headers );

do_action( 'bbp_post_notify_subscribers', $reply_id, $topic_id, $user_ids );

return true;

ref: \bbpress\includes\common\functions.php L:1161

from wordpress-sparkpost.

cfk4spk avatar cfk4spk commented on July 19, 2024

Hi MichaelPereiraUK
I may be doing something wrong - for SMTP . . I believe I have the permissions set to use it - in the API key settings, and my tests in the plugin settings page say 'successful' -- but no emails get through, and nothing shows up on SparkPost dashboard. I will try again in the morning.

As to the temporary solution you suggest -- I don't think I'm good enough at PHP to manipulate the filters.

If there's any chance that you might want to send me any hints about just how I might play around with it, I'd appreciate any insight.

Presently, it is very late here, and I need to grab a couple hours of sleep - but I will be back to this as early as possible in our AM.
THANK YOU for your help!

Chris

from wordpress-sparkpost.

rajumsys avatar rajumsys commented on July 19, 2024

I'm guessing it's related to #23 which is what rajumsys is referring to as why SMTP should work.

@MichaelPereiraUK yes, exactly that's the reason I found. bbpress sends to noreply and puts everyone else in BCC. But HTTP mailer doesn't have BCC support yet.

from wordpress-sparkpost.

cfk4spk avatar cfk4spk commented on July 19, 2024

@MichaelPereiraUK yes, exactly that's the reason I found. bbpress sends to noreply and puts everyone else in BCC. But HTTP mailer doesn't have BCC support yet.

Thanks rajumsys
Do you know if this is something that might be changed in the future? (by any chance - in the 'near' future)? :-)
Meanwhile, I'll keep trying to figure out a way to use the filters.
I can leave bbPress253 in place for now -- but I don't suppose I can do that 'forever'
Thanks

from wordpress-sparkpost.

MichaelPereiraUK avatar MichaelPereiraUK commented on July 19, 2024

@cfk4spk - Just re-looked at the snippet I put through earlier. Clearly hadn't had my coffee ☕

It's not going to work as you'll be able to get the $headers variable which has all the contacts you need but you won't be able to mail out as you won't have the $message.

What you could probably do however which fixes the whole BCC thing temporarily is hook onto the wp_mail filter.

/**
* Filter the wp_mail() arguments.
*
* @since 2.2.0
*
* @param array $args A compacted array of wp_mail() arguments, including the "to" email,
*                    subject, message, headers, and attachments values.
*/
$atts = apply_filters( 'wp_mail', compact( 'to', 'subject', 'message', 'headers', 'attachments' ) );

Since at this point you have all the details you'll need so you can just check the headers value for BCC contacts and strip them out into an array for the to value.

Again, this is just speculation and I can't say I'm too confident that it'll work out as described.

from wordpress-sparkpost.

cfk4spk avatar cfk4spk commented on July 19, 2024

Thanks Michael -
I will see if I can manage to get it to work!
Even a temporary fix is a good thing - sometimes! :-)

from wordpress-sparkpost.

cfk4spk avatar cfk4spk commented on July 19, 2024

Update - maybe this will help others too . . . (?)
There is a WordPress plugin available . . . and it WORKS to fix the bcc issue between SparkPost and bbPress. I'm not sure if it can be used to help the BuddyPress issue, but it may be worth a try ?
AsynCRONous bbPress Subscriptions
https://wordpress.org/plugins/asyncronous-bbpress-subscriptions/

from wordpress-sparkpost.

rajumsys avatar rajumsys commented on July 19, 2024

Just wanted to follow up if anyone else is still facing any issues regarding bcc (in bbpress) or sending with buddypress. Recently I've provided a solution to buddypress problem in #32.

I'm closing this ticket for now but please feel free to re-open if necessary.

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.