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: 3.8.001, 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.8.x Rating: (22 votes - 4.73 average) Installs: 295
Released: 10 Jan 2009 Last Update: Never Downloads: 1695
Not Supported Uses Plugins Code Changes Additional Files Translations  

As of 24 Nov 2017 this modification has been withdrawn.

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

The result of this can be that your server can gets seriously overloaded very quickly - or on many hosts, you get banned for exceeding their e-mail sending limits. This can make sending several thousand e-mails (like a newsletter) very difficult.

This modification does two things ;

1. The processing of the mail queue is set-up as a vbulletin cron item.

2. Allows you to add a small delay before each e-mail is sent (between 1 and 9 seconds).

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

Use option 2 carefully, otherwise you will slow your e-mail system right down.

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 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.

This modification includes the code by Antivirus that displays the current size of the mail queue.


History:

v3.8.001 : First Release for vB 3.8.

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
Administrative and Maintenance Tools Cron Based E-Mail Sending Paul M Modification Graveyard 164 27 Sep 2009 14:57
Cron based e-mail queuing and sending Paul M Modification Graveyard 19 23 Oct 2006 00:57

  #61  
Old 30 Mar 2009, 16:02
PPUS PPUS is offline
 
Join Date: Mar 2009
OK, thanks Paul... so I have it set as:

Number of Emails to Send Per Batch: 50 and the delay at 1 second. Is this the only setting I need? I do not want to exceed 500/hour as I am allowed 600 and the extra 100 is for other functions and email users on the server. I am I correct that there are no settings in the mod/hack, only those in the ACP?

Gotta say I am nervous as a long tail cat in a room of rocking chairs.
Reply With Quote
  #62  
Old 30 Mar 2009, 17:15
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul M
The cron runs 6 times an hour (every 10 minutes), so 50 x 6 = 300 an hour, well under your 500/Hr - you are fine.
__________________
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
  #63  
Old 30 Mar 2009, 17:48
PPUS PPUS is offline
 
Join Date: Mar 2009
Originally Posted by Paul M View Post
The cron runs 6 times an hour (every 10 minutes), so 50 x 6 = 300 an hour, well under your 500/Hr - you are fine.
Ahh, the light bulb comes on, I did not realize the cron ran 6x per hour. So whatever I put in the field is x6 to give me the hourly send rate. So a quick math lesson for other:

Setting the "Number of Emails to Send Per Batch" to:

50 = 300/hr
60 = 360/hr
70 = 420/hr
80 = 480/hr
90 = 540/hr

Perfect! I got it now, Thanks again Paul.
Reply With Quote
  #64  
Old 31 Mar 2009, 14:23
tehPARADOX tehPARADOX is offline
 
Join Date: Feb 2007
I just wanted to stop by to warn you guys:

If you have say over 200,000 emails queued and you decide to upgrade vbulletin, make sure to do the file edits on the new files immediately before uploading it!

I made the noob mistake of uploading a fresh functions.php onto the server. Within seconds, all the emails were sent out, bringing my server to a halt with a load of 1000+.

I didn't know what the heck was going on until I saw exim crash.
__________________
Reply With Quote
  #65  
Old 01 Apr 2009, 00:06
obmob obmob is offline
 
Join Date: Nov 2001
Hmm... yeah, editing first might be a wise action
Reply With Quote
  #66  
Old 02 Apr 2009, 18:39
Plasma2002 Plasma2002 is offline
 
Join Date: Jul 2006
Real name: Brian
Hey Paul,

Ive been using this addon for quite a while now and it has been a lifesaver... but i have a question.

Maybe it has nothing to do with your addon, and its more of a vBulletin thing, but you may know the answer anyways


I dont have much traffic on my forums (most the traffic is on the main site), so this becomes a problem when, say, in the middle of the night, i have a newsletter that needs to go out to 8,000 people that doesnt get finished until the next couple weeks.

What i tried to do to remedy this was make my local machine at home just do a simple wget of vBulletin's cron.php file every 5 minutes.

I figured this would be the best solution... but for some reason, when i look at my mailqueue from the adminpanel, it shows that the number of unsent mails never changed when i just hit the cron.php file... but it works fine if i leave a browser on the forums and make it reaload every 60 seconds.

Would you happen to have any idea how i can manually execute the cron and make my emails send out when my forums are empty?


Thanks


EDIT: I found out my problem, in case anybody got here by googling. it was in fact my wget script... if you are trying to run your cron's manually, simply make something hit cron.php on your forums.

Last edited by Plasma2002; 02 Apr 2009 at 22:01.
Reply With Quote
  #67  
Old 02 Apr 2009, 20:16
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul M
Sorry, I dont.
__________________
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
  #68  
Old 20 Apr 2009, 08:59
cellow cellow is offline
 
Join Date: Oct 2006
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.
All my activation links are queued. My Users are waiting up to 10 minutes for their activation e-mails.

How can i solve this problem?
Reply With Quote
  #69  
Old 20 Apr 2009, 10:22
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul M
As it says, activation e-mails are not queued by 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
  #70  
Old 20 Apr 2009, 13:48
cellow cellow is offline
 
Join Date: Oct 2006
did you test it on your forum? Why my vb queued activation links?
how can i solve this problem?
Reply With Quote
  #71  
Old 20 Apr 2009, 13:52
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul M
I dont need to test it, just look at the registration code.

Activation e-mails (to members) are not queued. All that gets queued is New User Notification e-mails.

There is no problem to solve.
__________________
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
  #72  
Old 02 May 2009, 19:37
nohuhu nohuhu is offline
 
Join Date: Dec 2008
Paul M,

russian translation for your must-have mod.
Attached Files
File Type: xml cbmq-language-russian-cp1251.xml (2.5 KB, 5 views)
Reply With Quote
  #73  
Old 19 May 2009, 00:42
LAJAURIA LAJAURIA is offline
 
Join Date: Mar 2008
I can't find where I can change the options in the ACP.
Reply With Quote
  #74  
Old 09 Jun 2009, 18:12
plothook plothook is offline
 
Join Date: Apr 2007
Just thought I'd mention:
The scheduled task this product creates is titled "Process Mail Queue for vBulletin 3.7"
The title has no real effect, but it's an easy fix
Reply With Quote
  #75  
Old 09 Jun 2009, 20:49
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul M
Yeah, See posts #56 & #57.
__________________
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 09:45.

Layout Options | Width: Wide Color: