Opened 4 years ago
Closed 4 years ago
#3260 closed defect (bug) (fixed)
Incompatibility between notifications with lots of bcc headers and third-party email services
Reported by: |
|
Owned by: |
|
---|---|---|---|
Milestone: | 2.6 | Priority: | high |
Severity: | normal | Version: | 2.5.4 |
Component: | API - Subscriptions | Keywords: | needs-patch |
Cc: | espellcaste |
Description
In r5260, bbPress switched forum and topic notifications from many wp_mail()
calls to a single wp_main()
call with many bcc
headers.
Some third-party email services block API calls with lots of bcc
headers. Postmark's cap is 50, from my experience. This means that a forum notification with more than 50 recipients won't be delivered at all.
I don't think this is necessarily bbPress' problem to solve. More so, it's an odd problem that lies at the intersection of bbPress and the third-party services.
But, a workaround I just deployed is to split the batch into multiple chunks. bbPress could do something similar (send emails in batches of ~40 bcc headers), and strike a reasonable balance between performance and compatibility.
Previously #2162
bbPress included some chunking in
bbp_get_email_addresses_from_user_ids()
in r6725 to alleviate reported slowness from large unboundedget_users()
calls, and I think it makes sense to try and do this for the BCC field in general also.Ironically, what you propose here would ultimately override that, as the default value for the
bbp_get_users_chunk_limit
filter is100
. We can likely abstract the bulk of what is similar betweenbbp_notify_topic_subscribers()
andbbp_notify_forum_subscribers()
at the same time.