SocietyPress 1.5.67: big mailings stay under your web host’s hourly limit

SocietyPress 1.5.67 is out. Update from Dashboard → Updates, or download it from the download page.

What’s new for your society

Large mailings no longer lose members to your web host’s hourly limit. Most web hosts only let a website send a certain number of emails per hour, often 500, and quietly throw away anything over that. A newsletter to a large membership could lose its last few hundred messages without anyone knowing.

SocietyPress now spaces large mailings out to stay under the limit. When it’s reached, the mailing pauses and picks up again by itself, and the email’s page tells you when (“paused for your hourly email limit, resumes about 3:40 pm”). Renewal reminders, expired-membership notices and event reminders wait their turn the same way and finish later the same day. Password resets, receipts and other one-off emails are never held back.

What to do: nothing, for most societies. The new Send Email → Sending speed box defaults to 400 emails an hour, which suits most web hosts. If you send through an email service such as Brevo, choose No limit.

For developers

  • Every successful wp_mail() is counted (To + Cc + Bcc) on wp_mail_succeeded into per-minute buckets covering a rolling 60 minutes, stored in the non-autoloaded option sp_mail_rate_buckets.
  • Limit: option sp_email_hourly_limit (default 400; 0 = unlimited). Helpers: sp_mail_hourly_limit(), sp_mail_rate_remaining(), sp_mail_rate_sent_last_hour(), sp_mail_rate_next_opening().
  • sp_blast_email_send_batch() caps each batch at the remaining allowance; at zero it reschedules itself for the same offset and stores the resume time in the transient sp_blast_resume_{id}.
  • Renewal reminders, expired notices and event reminders stop before the next send and schedule a one-off continuation (sp_renewal_reminder_resume, sp_event_reminder_resume). Both jobs already record each send, so the rerun skips anyone already emailed. sp_process_expired_notices() now returns bool.

Full details: release notes on GitHub.

← Back to the Blog

Follow the blog

Get new posts by email. Confirm once, unsubscribe any time.

Prefer a feed reader? Subscribe by RSS

Leave a comment

Your email address won't be shown. Your first comment waits for approval before it appears.