Email Throttler
Permalink
My host, like many, have an hourly limit to email sent. My particular limit is 250.
Has anyone dabbled in the possible extension of the mail helper to provide functionality that would queue emails if the site was close to the hourly limit?
If not, what do you think of this work flow..
Create a new helper that extends the mailhelper
Create a new sendMail() method that would include a counter (reference config value)
if $mails_sent_this_hour >= $max_mails_per_hour, serialize the object properties (not sure how I would do this yet from within the helper) and store in the database
The setup a CRON that runs hourly and checks the database for unsent mail, if it finds it, send the mail up to the limit of course.
Does anyone have anything like this? I couldn't find anything for zend-mail, and nothing here at c5..
Anyone have any better ideas on implementation?
Thanks for your input.
-Guy
Has anyone dabbled in the possible extension of the mail helper to provide functionality that would queue emails if the site was close to the hourly limit?
If not, what do you think of this work flow..
Create a new helper that extends the mailhelper
Create a new sendMail() method that would include a counter (reference config value)
if $mails_sent_this_hour >= $max_mails_per_hour, serialize the object properties (not sure how I would do this yet from within the helper) and store in the database
The setup a CRON that runs hourly and checks the database for unsent mail, if it finds it, send the mail up to the limit of course.
Does anyone have anything like this? I couldn't find anything for zend-mail, and nothing here at c5..
Anyone have any better ideas on implementation?
Thanks for your input.
-Guy
http://www.concrete5.org/marketplace/addons/mailing-list/...
there are a few parts to getting this kind of thing to work, like a queue of mailings, keeping track of the various recipients, and tracking who's already received the mailing so they don't receive multiple copies, service for running the cronjob, configuration interface, logging, etc. I'm not sure what part of your site is generating that many mailings, but rather than recreate the wheel, you could route your emails through that package. I few other users have hooked into it recently for other things like SMS messages. I can point you in the right direction if you choose to go that route. Send me a PM if you want more info.