Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard

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

Version: 3.5.x Rating:
Released: 02-04-2006 Last Update: Never Installs: 35
 
No support by the author.

This modification is no longer available or supported.

Cron based e-mail queuing and sending.

At the moment, 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 in the case of the ACP Email users inteface, sends them straight away. As a result 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 I did this very simple modification to our forum to overcome the problem, and have since been asked about it a couple of times, so here it is.


This 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 e-mail queuing on 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 we do and set it to run every 15 minutes, and set the items to be processed to something larger (like 150).

Remember, 10 per minute = 600 per hour, 150 per 15 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 do 9999 at once (not 500 or whatever) as the mails will now go into the queue, not be sent direct.

Note: This will affect any queued e-mails such as subscription e-mails. It will not affect registration e-mails as they bypass queuing anyway.




History:

v1.06 : First Release.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 02-09-2006, 07:23 AM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks Paul, this is a perfect fit for a site I have planned that will be taking on a large number of users and sending out a lot of e-mail.
Reply With Quote
  #13  
Old 02-23-2006, 07:06 AM
Akagi Akagi is offline
 
Join Date: Jan 2006
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

im wondering, for the Mailqueue, do i need to set "Yes,with locking", say if i've got a site with 20k members?
Reply With Quote
  #14  
Old 02-23-2006, 07:23 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

You shouldn't need locking with this as there is no potential for mail sends to overlap.
Reply With Quote
  #15  
Old 02-24-2006, 02:36 AM
Akagi Akagi is offline
 
Join Date: Jan 2006
Posts: 47
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks for the reply. *installed*
Reply With Quote
  #16  
Old 03-22-2006, 10:05 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

I just love this, we sent a newsletter to 5,500 of our members on Monday and I just sat back and watched as it gently went out over 10 hours.
Reply With Quote
  #17  
Old 06-06-2006, 08:48 AM
kafi kafi is offline
 
Join Date: Apr 2004
Posts: 379
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I like the idea of this hack.

Additionally I would like to split sending out email by 1000 users (userid's) per day. Would this be possible?

I am afraid to send all at one day and then face loto fo support questions in that very day ... (that is my reason for to split newsletter)....

Thank you .-)
Reply With Quote
  #18  
Old 08-01-2006, 02:37 AM
eytan eytan is offline
 
Join Date: Feb 2002
Posts: 32
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

will this work for VB 3.6?

thanks
Reply With Quote
  #19  
Old 08-01-2006, 08:29 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

Quote:
Originally Posted by eytan
will this work for VB 3.6?
Yes.
Reply With Quote
  #20  
Old 10-22-2006, 11:48 PM
psico psico is offline
 
Join Date: Oct 2001
Location: Buenos Aires, Argentina
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Now that vb 3.6 has been released, there will be no further updates to this modification.
Why?
Reply With Quote
  #21  
Old 10-22-2006, 11:57 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

Because I only update & develop on the current version.

JFYI, As above, this runs quite happily on vb 3.6 anyway.
Reply With Quote
Reply

Thread Tools

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 07:15 PM.


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.10539 seconds
  • Memory Usage 2,286KB
  • 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
  • (2)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
  • (1)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • 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