Allow mail sending via cron

ff1 - February 28, 2008 - 13:32
Project:Mass Contact
Version:5.x-2.4-beta
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active
Description

My server has a limit that will only allow me to send 500 emails per hour (that's total recipients, eg. 500 emails to single recipients or 1 email to 500 recipients). I currently have about 1000 users in a role that I needed to email, so when I tried to use this module, I got lots of messages back from my server saying that the emails had been blocked.

It would be very useful to have a configuration option something along the lines of 'Max number of emails per hour'.

The module would then check to see if sending the next email would exceed this limit. If so, it would postpone the sending of any more emails until the next cron run, when it would check again.

I think it would require a new database table listing each email sent, the timestamp when it was sent and the number of recipients. The module could then query the table to find the sum of all recipients in the last hour.

It would also require an email queue table to store all pending emails until they are sent.

I hope I have explained this clearly enough. If not, please let me know.

Ian

#1

oadaeh - February 28, 2008 - 13:52

You could try the new MailQ module: http://drupal.org/project/mailq. I have not looked at anything beyond the description, so I have no idea if it works or not.

There's also a Job queue module, but I think Mass Contact needs to be configured to use it: http://drupal.org/project/job_queue. Again, I haven't done anything more than read the description.

#2

ff1 - February 28, 2008 - 14:25

Thanks for that. I'll check out MailQ and report back if it works successfully with mass contact. On first inspection, there seems to be no reason why not.

Another question for you though... Have you found a good way of testing the mass contact module without sending emails to hundreds of legit users?

Cheers,
Ian

#3

oadaeh - February 28, 2008 - 16:18

Currently the way I do it is to create a special category based on a special role that has two or more accounts, which are just other e-mail addresses to myself.

 
 

Drupal is a registered trademark of Dries Buytaert.