Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Cron Based E-Mail Sending Details »
Cron Based E-Mail Sending
Mod Version: 1.12, by Paul M (Member) Paul M is offline
Developer Last Online: Jan 2018 I like it Show Printable Version Email this Page

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.




History:

v1.12 : First Release for vB 3.6.

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Administrative and Maintenance Tools Cron Based E-Mail Sending Paul M Modification Graveyard 151 03 Jun 2010 03:17
Cron based e-mail queuing and sending Paul M Modification Graveyard 19 23 Oct 2006 00:57

  #106  
Old 06 Dec 2007, 11:10
plothook plothook is offline
 
Join Date: Apr 2007
* Clicks Mark as Uninstalled *
Just what we needed to get all our stuff out past our hosts 200 emails/hour limit @30 emails /10 minutes
Now everyone will get their daily e-mail notifications, even if it does take the system 3-4 hours to get the job done.

Thanks Paul!
---------------------------------
now if it only were truely CRON based and didn't depend on site activity, though we always get more than enough site hits to trigger things
Reply With Quote
  #107  
Old 26 Dec 2007, 12:15
SVTCobraLTD SVTCobraLTD is offline
 
Join Date: Jul 2007
Installed using hostgator. Thank you, exactually what I needed and will be setting it to 25 emails per batch. Thanks - Nominated for mod of the month.

SVT
Reply With Quote
  #108  
Old 26 Dec 2007, 12:17
SVTCobraLTD SVTCobraLTD is offline
 
Join Date: Jul 2007
Originally Posted by Antivirus View Post
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.
A great addition to this great hack.

SVT
Reply With Quote
  #109  
Old 27 Dec 2007, 07:58
dartho dartho is offline
 
Join Date: Sep 2005

^
|
|
|


What (s)he said x 2
Reply With Quote
  #110  
Old 27 Dec 2007, 17:13
Farcaster Farcaster is offline
 
Join Date: Dec 2005
Real name: Robert Howard
I have to agree. This plus the crontab based vbcron jobs is a killer combination!
Reply With Quote
  #111  
Old 28 Dec 2007, 10:03
BlizzardHQ BlizzardHQ is offline
 
Join Date: Dec 2007
Real name: Mike
Working great still in Beta 3.

Hostgator is now imposing a 200 per hour limit. I recommended this on their forum for all vB users for that
Reply With Quote
  #112  
Old 28 Dec 2007, 10:42
SVTCobraLTD SVTCobraLTD is offline
 
Join Date: Jul 2007
Yea it sucks having vB on hostgator site and can only send 200 emails a day. This is the perfect fix for that. Props to Dr Pepper Addict

SVT
Reply With Quote
  #113  
Old 30 Dec 2007, 06:49
kushal kushal is offline
 
Join Date: May 2006
Real name: Shrawan
Yes, it will solve lot of problems for us.
Reply With Quote
  #114  
Old 01 Jan 2008, 19:21
RFViet RFViet is offline
 
Join Date: Jan 2006
Installed, thanks.
Reply With Quote
  #115  
Old 02 Jan 2008, 13:31
almqdad's Avatar
almqdad almqdad is offline
 
Join Date: Jul 2003
I am getting this error after upgrading php verion

Database error in vBulletin 3.6.5:

Invalid SQL:

UPDATE datastore SET
data = data - 60,
data = IF(data < 0, 0, data)
WHERE title = 'mailqueue';

MySQL Error : MySQL server has gone away
Error Number : 2006
Date : Wednesday, January 2nd 2008 @ 12:16:37 AM
Script : http://alhawza.net/forum/forumdisplay.php?f=50
Referrer : http://alhawza.net/forum/showthread.php?t=50724
IP Address : 87.230.151.169
Username : منا(العلم)هل
Classname : vB_Database

is there a way to resolve this issue
Reply With Quote
  #116  
Old 02 Jan 2008, 15:48
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul M
Increase your sql timeout, or reduce the number of emails you send in one batch.
__________________
Former vBulletin.org Staff Member


Cable Forum
Please do not PM me about custom work - I no longer undertake any.
Note: I will not answer support questions via e-mail or PM - please use the relevant thread or forum.
Reply With Quote
  #117  
Old 05 Jan 2008, 17:21
SBlueman SBlueman is offline
 
Join Date: Jan 2006
I'd like to set it so it sends 100 emails per hour....what do I need to edit? The ACP functions confuse me and I don't know what to edit and where.
Reply With Quote
  #118  
Old 11 Jan 2008, 05:19
USAMustangs.com USAMustangs.com is offline
 
Join Date: Mar 2007
Thanks. It seems to be working fine for now.

This is a fantastic feature for vB forums. My host has a hourly email limit of 250. There are a many instances where I need to send out a mass pm to my members. I just end up exceeding my mail quota and everything gets returned. Hopefully, this will permanently solve that problem.

This is a feature that should come OEM in vBulletin. Makes no sense to me why it's not built into vB in the first place, considering the nature of these types of forums.
__________________
vBulletin 3.6.5
My forum
Reply With Quote
  #119  
Old 25 Jan 2008, 03:40
jshg46 jshg46 is offline
 
Join Date: Aug 2005
installed

Is there any way to get around the server not sending subscription emails right away instead they are being put in the mail deal also. so in tread replys email.
Reply With Quote
  #120  
Old 25 Jan 2008, 12:45
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul M
Subscription etc emails are designed to be queued, thats standard vb.
__________________
Former vBulletin.org Staff Member


Cable Forum
Please do not PM me about custom work - I no longer undertake any.
Note: I will not answer support questions via e-mail or PM - please use the relevant thread or forum.
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


New To Site? Need Help?

All times are GMT. The time now is 10:32.

Layout Options | Width: Wide Color: