Back to Modification Graveyard

Cron Based E-Mail Sending
Mod Version: 1.12, by Paul M

This thread is in the Modification Graveyard.
vB Version: 3.6.x Rating: (12 votes - 4.67 average) Installs: 159
Released: 12 Dec 2006 Last Update: Never Downloads: 1021
Not Supported Uses Plugins Code Changes Additional Files Translations  

This modification is no longer available or supported.

This is a 3.6 specific port of the 3.5 Modification.

In default vBulletin if you send a large number of e-mails, vbulletin either puts them in it's queue and then attempts to send them as each user visits a page, or just simply tries to send them straight away (This is the case when you use the Administrators email users inteface).

As a result of this your server can become seriously overloaded very quickly - so sending several thousand e-mails (like a newsletter) can become very difficult (hours spent clicking 'next' in the ACP) - as a result of these problems, this very simple modification was born.

This modification does two things ;

1. E-mails from the ACP inteface are sent to the mail queue, not straight to the mail system.

2. The processing of the mail queue is set-up as a vb cron item.

Obviously for this to work, you must turn on e-mail queuing in the ACP options - set 'Use Mailqueue System' to 'Yes', and 'Number of Emails to Send Per Batch' to a realistic value (based on the cron setting, as below).

There are two realisitc options for the cron job, you can either set it to run every minute, and set the items to be processed to something small (like 10), or you can do what this modification does by default and set it to run every 10 minutes, and set the items to be processed to something larger (like 100).

Remember, 10 per minute = 600 per hour, 100 per 10 minutes is also 600 per hour. The numbers really depend on how quick you want large queues processed, and how much your mail server can handle in one go.

Once working, when using the ACP mail users inteface, remember you can set it to process 9999 at once (not 500 or whatever) as the mails will now go into the queue, not be sent directly.

Note: This modification will affect any queued e-mails such as subscription e-mails. It will not affect registration e-mails as they bypass queuing anyway.

Upgrading from the 3.5 version.
If you have the 3.5 version installed then you don't need to upgrade - however if you decide to upgrade then you need to delete the current cron job in the Scheduled Tasks Manager and then import the product xml via the ACP Product Manager. The file edits do not need to be changed.

Queue Size

Antivirus has posted a nifty little addon that displays the current size of the mail queue here

Spoiler (click to open)


Great modification Paul, really helps with sending out emails to large amounts of members. I found myself wondering how many emails were in the queue quite often however, and I got tired of manually running a SELECT query in the console to find out how many emails were remaining in the queue... so i coded the attached add-on for your mod which adds the quantity of remaining emails in the mail queue to the AdminCP page.

You can see a screenpic of what it does in the attached "screenie.gif" image. I just thought I would share it with everyone who's using this mod, makes life a little easier.
Attached Images
File Type: jpg screenie.jpg (54.4 KB, 257 views)
Attached Files
File Type: xml product-anti_mailqueue_stats_acp.xml (2.4 KB, 189 views)

Close
.



History:

v1.12 : First Release for vB 3.6.

Download

This modification cannot be downloaded.

Similar Mods

Administrative and Maintenance Tools Cron Based E-Mail Sending Modification Graveyard
Cron based e-mail queuing and sending Modification Graveyard

vblts.ru supports vBulletin®, 2022-2024