Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Cron based e-mail sending Details »»
Cron based e-mail sending
Version: 3.8.001, by Paul M Paul M is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Administrative and Maintenance Tools - Version: 3.8.x Rating:
Released: 01-09-2009 Last Update: Never Installs: 295
Uses Plugins
Code Changes Additional Files Translations  
No support by the author.

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.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
4 благодарности(ей) от:
ahmedeldeep, need2fart, rpgamersnet, xorex

Comments
  #282  
Old 01-30-2012, 04:37 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It will work on any 3.8.x
Reply With Quote
  #283  
Old 03-02-2012, 07:24 PM
rpgamersnet rpgamersnet is offline
 
Join Date: Jul 2004
Location: Canada
Posts: 29
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just wanted to say thanks for a great mod Installed without a hitch and got it setup the way I needed. A must-have for any busy forum!
Reply With Quote
  #284  
Old 05-24-2012, 10:18 AM
majidsr majidsr is offline
 
Join Date: Jun 2006
Posts: 2
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Paul, thanks very much for a welldone job

I installed it and it work 100%

Best Regards
Reply With Quote
  #285  
Old 07-18-2012, 03:11 AM
christon26 christon26 is offline
 
Join Date: Dec 2008
Location: Australia
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Please forgive me if this has been answered already, I did search lol

I know we can view the quickstats in the admin as to how many emails are in the queue, is there a place we can view the actual emails that are queued? Like a list?
Reply With Quote
  #286  
Old 07-18-2012, 11:45 AM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No, there isnt.
Reply With Quote
  #287  
Old 07-22-2012, 08:20 AM
christon26 christon26 is offline
 
Join Date: Dec 2008
Location: Australia
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

That's a shame lol thanx though
Reply With Quote
  #288  
Old 08-07-2012, 10:20 PM
tommydamic68's Avatar
tommydamic68 tommydamic68 is offline
 
Join Date: Jan 2009
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I am having an issue that maybe someone else has ran into or can help me with. I use the following newsletter https://vborg.vbsupport.ru/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
Reply With Quote
  #289  
Old 10-26-2012, 05:09 PM
tommydamic68's Avatar
tommydamic68 tommydamic68 is offline
 
Join Date: Jan 2009
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
  #290  
Old 10-28-2012, 08:58 PM
Paul M's Avatar
Paul M Paul M is offline
 
Join Date: Sep 2004
Location: Nottingham, UK
Posts: 23,748
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This cannot slow down posting or replying, there is simply no connection between the two.
Reply With Quote
  #291  
Old 10-29-2012, 12:26 AM
tommydamic68's Avatar
tommydamic68 tommydamic68 is offline
 
Join Date: Jan 2009
Posts: 102
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
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.
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 05:00 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.09215 seconds
  • Memory Usage 2,321KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (4)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete