Question

Short: Is it possible using PHP / SwiftMailer / Throttler Plugin - if yes, how - to set a MESSAGES_PER_HOUR limit instead of the MESSAGES_PER_MINUTE limit? Or is there any other solution for reaching the same goal?


Long: I am using php and Swift Mailer to send a list our daily offers to the customers who have opted in. Definitely not spam. I have talked to my server administrator, and the hourly limit is 3000 emails. Our list is close to reaching that, so I started looking for a solution. Using MESSAGES_PER_MINUTE set to 50 does work, but the question is if it's possible to set an hourly limit instead of a per minute limit. A lot of customers are staying awake to receive the new offers in order to make their purchases asap, and this would mean making some of them wait almost an hour more in the middle of the night. New list members will receive the offers after 1 am anyways, so it should not be strange for them.

Was it helpful?

Solution

AFAIK, it is not possible using the built-in Throttler Plugin. But you should be able to make you own, extending Swift_Plugins_BandwidthMonitorPlugin.

Take a look at Swift_Plugins_ThrottlerPlugin code source (here for example). It should be easy enough to adapt it to your needs.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top