Skip to:
Content

bbPress.org

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: danielbachhuber's profile danielbachhuber Owned by: johnjamesjacoby's profile johnjamesjacoby
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

Change History (3)

#1 @johnjamesjacoby
4 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 2.6
  • Priority changed from normal to high

bbPress included some chunking in bbp_get_email_addresses_from_user_ids() in r6725 to alleviate reported slowness from large unbounded get_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 is 100. We can likely abstract the bulk of what is similar between bbp_notify_topic_subscribers() and bbp_notify_forum_subscribers() at the same time.

#2 @espellcaste
4 years ago

  • Cc espellcaste added

#3 @johnjamesjacoby
4 years ago

  • Owner set to johnjamesjacoby
  • Resolution set to fixed
  • Status changed from new to closed

In 6919:

Emails: chunk notification emails into 40 Bcc'd recipients.

This commit introduces the bbp_mail subfilter, used to target bbPress specific emails in conjunction with bbp_get_email_header() to help identify emails that came specifically from bbPress actions.

The purpose of this change is to help forum owners avoid their outbound emails being marked as spam, due to the high number of users that can be subscribed to any given forum or topic.

This change (combined with r6725) goes a long way towards improving the success of subscription emails reaching their intended recipients.

Fixes #3260. Props danielbachhuber.

Note: See TracTickets for help on using tickets.