[wp-hackers] How to throttle emails on hosts with email sending limits?

Art Delano ajd at cloudiness.com
Fri Oct 9 21:55:41 UTC 2009

Would it be possible to make it work like this?
1. Check if anything needs sending
2. Concatenates all pending emails into a digested message

This would reduce the number of mails sent to one per time window.


On Oct 9, 2009, at 4:31 PM, Otto wrote:

> Looking at the plugin, it appears to hook to comment_post to send the
> notification emails.
> I'd rework it a bit. Change the comment_post hook to run a new
> function which does a wp_schedule_event to a new action (maybe
> stc_send_notifications?). Then hook that to a new function which does
> the following:
> 1. checks to see if anything needs sending still
> 2. sends emails up to limit
> 3. if still some left, do another wp_schedule_event to rerun at some
> future period of time.
> -Otto
> Sent from Memphis, TN, United States
> On Fri, Oct 9, 2009 at 2:39 PM, William Canino
> <william.canino at googlemail.com> wrote:
>> One of my blogs is on 000webhost and I use Mark Jaquith's "Subscribe
>> to Comments" plugin among others and its hosting account was  
>> suspended
>> one night when a discussion, well, got out of hand.
>> 000webhost's email sending limit is 'No more than 30 emails per 5
>> minutes and no more than 100 emails per hour.'
>> 000webhost's PHP config doesn't support SSL/TLS so I can't send via
>> Gmail. In any case, Gmail also has a limit of "100 people at a time".
>> So as a stopgap I added a "ORDER BY comment_date DESC LIMIT 28"  
>> clause
>> to Jaquith's plugin and crossed my fingers.
>> Before I go study how to add the Throttle plugin to Swift Mailer and
>> use Swift as a wp_mail() replacement, I thought of coming here to ask
>> if someone has already made or begun a throttling solution or plugin.
>> A plugin like this may be interesting to write for public release
>> because, for example, in this case, 000webhost has two limits and
>> gmail has another kind of limit.
>> W
>> P.S. It amuses me how often various plugins just "do their own thing"
>> to send their mail.
>> _______________________________________________
>> wp-hackers mailing list
>> wp-hackers at lists.automattic.com
>> http://lists.automattic.com/mailman/listinfo/wp-hackers
> _______________________________________________
> wp-hackers mailing list
> wp-hackers at lists.automattic.com
> http://lists.automattic.com/mailman/listinfo/wp-hackers

More information about the wp-hackers mailing list