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
  #172  
Old 01-19-2010, 12:50 AM
yoyoman yoyoman is offline
 
Join Date: Jan 2010
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi, Paul!
Installed and marked.

Next question. I installed the mod on vB 3.8.3 and sent 24 test emails with the batch value set to 10. Waited an hour, but nothing happened.
There are approximately 18 users viewing my forum at the moment. If I send more e-mails, they queue up. In the scheduled tasks it says that the next start is at 3:50, although I sent the e-mails at 4:24. Strange, huh?
If I run the mod manually - it works.

What could be the problem? Need a little tip here.

Kirill
Reply With Quote
  #173  
Old 01-19-2010, 01:06 AM
yoyoman yoyoman is offline
 
Join Date: Jan 2010
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

In the scheduled tasks I clicked edit, didn't change anything, clicked save and the next start time changed to 06:00. This was at 05:52. But now it's already 06:05 and nothing has happened - neither the queue of emails decreased, nor the next start time changed - it's still at 06:00.
Reply With Quote
  #174  
Old 01-19-2010, 11: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

Sounds like your cron system is not functioning correctly, either its broke, or you dont have enough real visitors to keep it going. When you say 18 users, are they spiders ? - as they will not trigger the cron system.
Reply With Quote
  #175  
Old 01-19-2010, 11:48 AM
Griffoneur Griffoneur is offline
 
Join Date: Nov 2007
Posts: 12
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Skipping over some users?
I have a dummy user account (ID: 260)

I have often noticed that when I send out e-mails (2500 members), my "Dummy Account" does not receive them. It is NOT in the junk e-mail filter. I have even tried using a different e-mail address.

My Dummy User account is set up as a regular forum member. My admin account (ID: 1) gets the e-mails every time. My dummy account will actually get the mass e-mail maybe 1 time in 8 e-mails. What is happening to the other 7?

I am concerned that maybe other "real members" are not getting the e-mails as well. There is no way for me to know who didn't receive it.

Has anyone else ever noticed or reported this?
Reply With Quote
  #176  
Old 01-19-2010, 07:08 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 neither knows or cares who e-mails are addressed to, it cannot skip users.
Reply With Quote
  #177  
Old 01-19-2010, 07:35 PM
yoyoman yoyoman is offline
 
Join Date: Jan 2010
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Paul M View Post
Sounds like your cron system is not functioning correctly, either its broke, or you dont have enough real visitors to keep it going. When you say 18 users, are they spiders ? - as they will not trigger the cron system.
Hi. Guess you are right. I got it working yesterday. And you know how?!!
This is just ridiculous!
Quote about CRON jobs from here: http://www.vbulletin.com/forum/showt...etin-cron-jobs
Quote:
The tasks take the form of a 1 x 1 transparent gif image loading on the page. So the page should still load, but it will show as continuing to load until the image / task finishes.
So the Cron jobs have something to do with the 1x1 Spacer.gif, which is loaded to your forum via the header template. And the funny thing is that I replaced this gif with a Christmas hat for the holidays. When I removed the Christmas hat your hack started working.
Very weird. Any comments on this issue?

BTW: I Suggest you add info about the spacer.gif into your manual, so people, who use custom styles check that it's in place. It's kinda impossible to think of it yourself if don't know beforehand.
Reply With Quote
  #178  
Old 01-19-2010, 07:38 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 do not work for IB/Jelsoft/vBulletin, I can neither comment on the cron system or have any input to the vbulletin manual.
Reply With Quote
  #179  
Old 01-19-2010, 07:41 PM
yoyoman yoyoman is offline
 
Join Date: Jan 2010
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Griffoneur View Post
Skipping over some users?
I have a dummy user account (ID: 260)

I have often noticed that when I send out e-mails (2500 members), my "Dummy Account" does not receive them. It is NOT in the junk e-mail filter. I have even tried using a different e-mail address.

...

Has anyone else ever noticed or reported this?
Quote:
Originally Posted by Paul M View Post
This neither knows or cares who e-mails are addressed to, it cannot skip users.
Actually, I can't agree here, Paul.
I understand, that theoretically, your mod doesn't care what type of user it is mailing, but...
I have three dummy accounts. Before your mod I tested all of them by sending single e-mails. All ok. But I mailed an informer yesterday to all the users and only one of my dummy accounts recieved it (and my admin account). The other two - didn't.
I have a 300/hour qouta, so your parameter was set to 40 - that's 240/hour. So this is ok.
Plus, I checked the server mailbox - no info on undelivered mail to the dummies.

So, what could be the problem here? Can you check, plz.
Reply With Quote
  #180  
Old 01-19-2010, 08:03 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

Quote:
Originally Posted by yoyoman View Post
Actually, I can't agree here, Paul.
I understand, that theoretically, your mod doesn't care what type of user it is mailing, but...
Well you can disagree if you want, but it wont change the facts. This has no bearing on who mail is sent to. Perhaps you are not clear on how this works - what it does is run the vBulletin mail processing code every 10 minutes instead of every page load. That code is standard (untouched) vbulletin code.

Quote:
Originally Posted by yoyoman View Post
So, what could be the problem here? Can you check, plz.
There is nothing I can check, as I said, this mod does not do the mail processing, vbulletin does that, all this does is change how often it runs.
Reply With Quote
  #181  
Old 01-21-2010, 07:28 AM
newmomsforum newmomsforum is offline
 
Join Date: Mar 2006
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great Mod , works well. Thanks Paul
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 07:34 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.07016 seconds
  • Memory Usage 2,325KB
  • 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
  • (6)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
  • (2)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