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

  #286  
Old 22 Jul 2012, 10:20
christon26 christon26 is offline
 
Join Date: Dec 2008
Real name: Lissa
That's a shame lol thanx though
__________________
-- I have just enough php knowledge to make me dangerous :P --
Reply With Quote
  #287  
Old 08 Aug 2012, 00:20
tommydamic68's Avatar
tommydamic68 tommydamic68 is offline
 
Join Date: Jan 2009
I am having an issue that maybe someone else has ran into or can help me with. I use the following newsletter http://www.vbulletin.org/forum/showthread.php?t=190082 (paid version) and have for years and it has worked fine, I send it monthly to members.

I did an uninstall of the Paul's cron based email mod for reasons which are not important. With that being said I have reinstalled the cron based email mod and put the settings back to what I thought they were in vb email settings, see attachments. i also use Hostgator which allows 500 emails per hour and with the email cron job never had an issue with my host.

Now, after reinstalling the email cron job mod and go to send the newsletter it says it sends about 452 which it should be sending about 3000+. Once it hits 452 it just stops, no error messages, no bounce backs etc. I just can't figure it out, are my settings wrong? did I miss something.

I can tell you this, I upgraded my bulletin from 3.8.4 to 3.8.7 a few months ago.

What I did come to find last night is that I forgot to update step 2 template change:
Step 2.

In includes/functions.php

find ;

exec_mail_queue();

change to ;

// exec_mail_queue(); // Paul M - Cron Mail Queue Hack //

I went in and did the edit, reinstalled the product.xml and chose overwrite, all other setting were not touched or changed. all edits completed as directed. any help would be appreciated.

thanks in advance.

Tom
Attached Images
File Type: jpg vbulletin email settings.jpg (120.0 KB, 11 views)
File Type: jpg cron job settings.jpg (31.7 KB, 14 views)

Last edited by tommydamic68; 08 Aug 2012 at 00:40.
Reply With Quote
  #288  
Old 26 Oct 2012, 19:09
tommydamic68's Avatar
tommydamic68 tommydamic68 is offline
 
Join Date: Jan 2009
I have removed this system, it conflicts with something else and slows down, posting and reply on my site, the only thing I can thing of is perhaps Tapatalk.
Reply With Quote
  #289  
Old 28 Oct 2012, 21:58
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul M
This cannot slow down posting or replying, there is simply no connection between the two.
__________________
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
  #290  
Old 29 Oct 2012, 01:26
tommydamic68's Avatar
tommydamic68 tommydamic68 is offline
 
Join Date: Jan 2009
Originally Posted by Paul M View Post
This cannot slow down posting or replying, there is simply no connection between the two.
Well,
When quoting or replying to a post, it "hung" for seconds, 10 seconds or more at times. I turned off all mods and had no issue with "hanging." Then I turned 4 - 5 mods off at a time trying to find the culprit.

When I got to this mod and disabled it, replies and quotes worked flawless. Although this mod no longer works for me (I wish it did) see a few posts above, I really have no use for it and just deleted it anyway, but I did try enabling it and disabling it to be sure this was in fact the problem - it was this mod, no question.

A lot of different mods have come about over the last few years and this mod, clearly has not had any real updates or changes to keep it up to date and working properly, so with that being said, my opinion is it is conflicting with another mod, perhaps a newer mod of sorts that could conflict with this one, and my guess is Tapatalk - particularly the 'push' feature in Tapatalk, not sure how or why, but it is my guess.

The old version of this mod before your last change worked flawless for me though. It's a shame, this was a great tool for forum owners who utilize news letters or large email distribution with limits in how many emails they can send per hour due to hosting limits.

Thanks for the reply though.

p.s. If you could so kindly supply me with the old .php file and .xml plugin - I would gladly take it back, install it, and hopefully begin sending my newsletters again. Honestly, I'm no coder, so i can't tell you why, I just know before I update the 3.8 version of this mod, it no longer worked for me. Only change on my end was upgrading to 3.8.7 from 3.8.4 - I did update the files on my server as well as the .php and new .xml plugin.

Last edited by tommydamic68; 29 Oct 2012 at 10:28.
Reply With Quote
  #291  
Old 03 Feb 2013, 22:21
kingbrend kingbrend is offline
 
Join Date: May 2007
I upgraded to vBulletin 3.8.7 Patch Level 3 and I'm unable to make changes to the functions.php file, commenting out // exec_mail_queue();

Every time I do that my forum goes blank and to fix it I have to upload the original 3.8.7 file.. any ideas? It worked fine for 3.8.3 but it was time to upgrade.

I'm not sure what I'm doing wrong.. I'd be happy to pay for your assistance Paul. Send me a PM, I'll give you $50 PayPal if you help me fix the issue.
Reply With Quote
  #292  
Old 15 Feb 2013, 18:31
microbob microbob is offline
 
Join Date: Jun 2009
Question NOTHING IN THE QUICK STATS on my ADMIN CP???

Paul,

I'm running vBulletin v3.8.7PL3. I set-up your e-mailing modification a couple of days ago. I then tried validating that it works properly (i.e., early this morning just after 12am EST); which [apparently] it did not.

I retraced the steps in terms of the install instructions:

1) See Screenshot # 1 (change code in admin/email.php file)
2) See Screenshot # 2 (just a note to indicate that there seems to be another instance of similar (but not exact code) for item # 1/screenshot #1).
2) See Screenshot # 3 (change code in includes/functions.php)
3) See Screenshot # 4 (upload mailqueue.php to /includes/cron)
4) See Screenshot # 5 hack by Antivirus is noted on the Plugins & Products Page on my Admin CP
5) See Screenshot # 6 cron-based e-mail hack is noted on the Plugins & Products Page on my Admin CP

Problem #1: when I go into my ADMIN CP, there is nothing in regards to a "Mailqueue Quick Stats" box as indicated by screenshot #7. You had also indicated that the only way that the Mailqueue Quick Stats box would not show up is if the Use Mailqueue System wasn't checked YES. As you can see from Screenshot # 9, it is checked YES. I also went back and checked my own vB Plug-In & Products System section to see if any clues might be there. In screenshot #8, there appears to be missing a check mark. Could this be why it's not showing the Mailqueue Quick Stats box on the Admin CP page?

Update: I checked the box and it's still not working.

Problem # 2: I checked with my web host this afternoon around 3pm EST and they informed me that only 20 e-mails went out over the last 24 hours. This indicates that the e-mail cron job did not work because the e-mail function indicated that I sent out 1,369 messages in batches of 8 (or thought I did). Screenshot #9 indicates my settings in vB E-Mail Options.

Please help.

Bob
Attached Images
File Type: png Crontracesteps.png (50.4 KB, 11 views)
File Type: png cronretracesteps1.png (30.0 KB, 6 views)
File Type: png cronretracesteps2.png (49.5 KB, 3 views)
File Type: png cronretracesteps3.png (26.7 KB, 5 views)
File Type: png CronEmailing.png (16.5 KB, 6 views)
File Type: png CronEmailing1.png (49.9 KB, 5 views)
File Type: png CronEmailingAdminCP.png (174.0 KB, 6 views)
File Type: png CronEmailingCheckMark.png (6.2 KB, 4 views)
File Type: png CronEmailingMailQueue.png (28.4 KB, 7 views)

Last edited by microbob; 15 Feb 2013 at 22:26.
Reply With Quote
  #293  
Old 19 Feb 2013, 09:57
sa3eka.com's Avatar
sa3eka.com sa3eka.com is offline
 
Join Date: Jan 2009
Hi Mr.Paul
It's not work with me in 3.8.7 pal2
But when I don't put the //
in step 2 it's work with me and Email sent

includes/functions.php
exec_mail_queue();
Reply With Quote
  #294  
Old 19 Feb 2013, 20:20
microbob microbob is offline
 
Join Date: Jun 2009
Are you saying that you changed the code from this:

// exec_mail_queue(); // Paul M - Cron Mail Queue Hack //

To this:

exec_mail_queue(); // Paul M - Cron Mail Queue Hack //

...and it worked?
Reply With Quote
  #295  
Old 19 Feb 2013, 20:22
microbob microbob is offline
 
Join Date: Jun 2009
Originally Posted by microbob View Post
Paul,

I'm running vBulletin v3.8.7PL3. I set-up your e-mailing modification a couple of days ago. I then tried validating that it works properly (i.e., early this morning just after 12am EST); which [apparently] it did not.

I retraced the steps in terms of the install instructions:

1) See Screenshot # 1 (change code in admin/email.php file)
2) See Screenshot # 2 (just a note to indicate that there seems to be another instance of similar (but not exact code) for item # 1/screenshot #1).
2) See Screenshot # 3 (change code in includes/functions.php)
3) See Screenshot # 4 (upload mailqueue.php to /includes/cron)
4) See Screenshot # 5 hack by Antivirus is noted on the Plugins & Products Page on my Admin CP
5) See Screenshot # 6 cron-based e-mail hack is noted on the Plugins & Products Page on my Admin CP

Problem #1: when I go into my ADMIN CP, there is nothing in regards to a "Mailqueue Quick Stats" box as indicated by screenshot #7. You had also indicated that the only way that the Mailqueue Quick Stats box would not show up is if the Use Mailqueue System wasn't checked YES. As you can see from Screenshot # 9, it is checked YES. I also went back and checked my own vB Plug-In & Products System section to see if any clues might be there. In screenshot #8, there appears to be missing a check mark. Could this be why it's not showing the Mailqueue Quick Stats box on the Admin CP page?

Update: I checked the box and it's still not working.

Problem # 2: I checked with my web host this afternoon around 3pm EST and they informed me that only 20 e-mails went out over the last 24 hours. This indicates that the e-mail cron job did not work because the e-mail function indicated that I sent out 1,369 messages in batches of 8 (or thought I did). Screenshot #9 indicates my settings in vB E-Mail Options.

Please help.

Bob
Can someone please help me out here???
Reply With Quote
  #296  
Old 20 Feb 2013, 19:13
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul M
Originally Posted by sa3eka.com View Post
Hi Mr.Paul
It's not work with me in 3.8.7 pal2
But when I don't put the //
in step 2 it's work with me and Email sent

includes/functions.php
exec_mail_queue();
That is simply bypassing the mod.
__________________
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
  #297  
Old 20 Mar 2013, 14:27
RFViet RFViet is offline
 
Join Date: Jan 2006
Please make it for vB 4.2. Thanks.
Reply With Quote
  #298  
Old 24 Mar 2013, 22:27
GoTTi GoTTi is offline
 
Join Date: Jun 2002
I have to send a email to about 4100 users and my server limits us to 500 emails per hour. what settings do I have to set on your mod and anywhere else, in the cron jobs, to send out 499 emails every hour? I cant seem to figure it out.

thank you paul
Reply With Quote
  #299  
Old 25 Mar 2013, 04:10
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Real name: Paul M
Remember that by default, it runs every 10 minutes, so 6 times an hour.

500 / 6 = 83, so set the batch size to 80 and you will be fine (6 x 80 = 480 / Hr).
__________________
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
  #300  
Old 25 Mar 2013, 14:07
microbob microbob is offline
 
Join Date: Jun 2009
Paul,

I'd really like to use your mod here but I haven't heard back from you. Can you help me get this working and address my issue in post # 292 and #295?

Thanks.

Bob
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 17:03.

Layout Options | Width: Wide Color: