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

  #76  
Old 06 Aug 2007, 09:18
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul M
Yes it does require edits.
__________________
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
  #77  
Old 06 Aug 2007, 13:31
txsbmw's Avatar
txsbmw txsbmw is offline
 
Join Date: May 2006
Thanks, I applied the updates to those PHP files so everything should be working fine now.
Reply With Quote
  #78  
Old 07 Aug 2007, 01:21
Nathan2006's Avatar
Nathan2006 Nathan2006 is offline
 
Join Date: Feb 2006
Originally Posted by Paul M View Post
Nope, it would send 1 e-mail every 10 minutes.

Thanks for that Paul,

They have increesed my emails to 500 per hour
Reply With Quote
  #79  
Old 25 Sep 2007, 07:17
Masiello's Avatar
Masiello Masiello is offline
 
Join Date: Jul 2005
Real name: Antonio
This mod is just what I need for my hosting server configuration, when I send mass emails the server go in overload and stop sending giving me database error in Admin Control Panel, with this mod I am able to set the sending in queue and for sure all email finish at destination!
Thanks Paul, I'll try this later
I always say that the Paul M and Cybernetec Mod's are the best!
Reply With Quote
  #80  
Old 27 Sep 2007, 08:19
Masiello's Avatar
Masiello Masiello is offline
 
Join Date: Jul 2005
Real name: Antonio
Hello Paul, I've not touch any setting in the CronJob and setting Number of Emails to Send Per Batch to 6, this presume that process sending 6 email per minute, it is right? Also this working when I send users email to all users? And when sending the email for all users, for example 600 users, it is possible to close my session from admincp to finish the sending process or I have to waiting logged in total time?

Thanks in advance for the clarify
Reply With Quote
  #81  
Old 27 Sep 2007, 11:13
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul M
Originally Posted by Masiello View Post
Number of Emails to Send Per Batch to 6, this presume that process sending 6 email per minute, it is right?

Nope, it will send 6 e-mails every 10 minutes.


Originally Posted by Masiello View Post
when sending the email for all users, for example 600 users, it is possible to close my session from admincp to finish the sending process or I have to waiting logged in total time?

You do not need to stay logged in, it will process the list straight away (just step through the pages) - the e-mails go into the e-mail queue.
__________________
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
  #82  
Old 27 Sep 2007, 16:32
Masiello's Avatar
Masiello Masiello is offline
 
Join Date: Jul 2005
Real name: Antonio
Bunny!

Originally Posted by Paul M View Post
Nope, it will send 6 e-mails every 10 minutes.
Oh yes sorry, speel error, I indeed 6 e-mail x 10 minutes, this is what I need, Thanks Paul
Reply With Quote
  #83  
Old 04 Oct 2007, 09:04
fly2hi fly2hi is offline
 
Join Date: Sep 2006
hi
i am having this error from the past one month
i check with my hosting company but no use
it just happen for sending mails an nothing else

please try to solve my problem becoz it help me alot from the time i add it
---------------
Database error in vBulletin 3.6.8:

Invalid SQL:

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

MySQL Error : MySQL server has gone away
Error Number : 2006
Date : Wednesday, October 3rd 2007 @ 04:31:29 PM
Script : http://www.q8x4.com/vb/cron.php?&rand=827783
Referrer : http://www.q8x4.com/vb/index.php
IP Address : 86.62.250.3
Username : غير مسجل
Classname : vB_Database
Reply With Quote
  #84  
Old 04 Oct 2007, 11:57
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul M
That's a mysql problem. If you search vbulletin.com I believe they have more details.
__________________
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
  #85  
Old 06 Oct 2007, 20:36
fly2hi fly2hi is offline
 
Join Date: Sep 2006
Unhappy

Originally Posted by Paul M View Post
That's a mysql problem. If you search vbulletin.com I believe they have more details.

i am lost !!!

its not a mysql problem becoz it just happen with the mail queue and every thing else is working fine.

and i have contact my hosting company they told me the problem with the sleeping quary

and when i contact the vbulletin.com support team they told me its a Cron Based E-Mail Sending add-on problem.

every one is just saying its not my problem

what can i do please help me becoz this corn job solve a big problem i was facing before and i can not stop using it.
Reply With Quote
  #86  
Old 07 Oct 2007, 01:08
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul M
Well I'm sorry they told you that, but the fact remains that it's a mysql issue.
__________________
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
  #87  
Old 24 Oct 2007, 22:43
Antivirus's Avatar
Antivirus Antivirus is offline
 
Join Date: Sep 2004
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)
__________________
Please feel free to PM me about custom work, installations, and upgrades!

Eclipse Records - Streetcult Street Team
Reply With Quote
  #88  
Old 25 Oct 2007, 11:37
Mudvayne's Avatar
Mudvayne Mudvayne is offline
 
Join Date: Dec 2005
Real name: Mudvayne
Thanks a lot Antivirus
Reply With Quote
  #89  
Old 25 Oct 2007, 17:13
Antivirus's Avatar
Antivirus Antivirus is offline
 
Join Date: Sep 2004
Originally Posted by Mudvayne View Post
Thanks a lot Antivirus
You are welcome!
__________________
Please feel free to PM me about custom work, installations, and upgrades!

Eclipse Records - Streetcult Street Team
Reply With Quote
  #90  
Old 06 Nov 2007, 19:02
Greek76's Avatar
Greek76 Greek76 is offline
 
Join Date: Sep 2006
Ok just a question. Im a little naive from what I see. I want to only send out 200 emails per hour since that is what Hostgator only allows.
I went to acp email options
Use mailqueue I checked to yes...
Number of Emails to Send Per Batch what would I put? I put 85 as I read in the first page but all my emails returned back. So what exactly am I doing wrong I can only send 200 emails per hour so how would I set that up? I also did the two file edits.
Thanks in advance...
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 20:14.

Layout Options | Width: Wide Color: