vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Administrative and Maintenance Tools - Cron based e-mail sending (https://vborg.vbsupport.ru/showthread.php?t=201318)

Paul M 01-09-2009 10:00 PM

Cron based e-mail sending
 
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.


Rene Kriest 01-10-2009 03:45 PM

Finally I need this addon since my forum is getting more and more members. ;)

Derek Chai 01-12-2009 04:07 AM

The cron isn't working for some reason. I had it set at every minute and now it's at the default every 10 and it isn't running according to the logs. I have about 200k mails in the quene.

Paul M 01-12-2009 06:47 AM

Have you tried to run it manually ?

RedFoxy 01-12-2009 12:33 PM

there is an admin/stats panel for that version?

Battle_Ring 01-12-2009 09:36 PM

Thank you , moved t oa new host and they have a 200 emails per hour limit

Battle_Ring 01-12-2009 09:44 PM

how do we set up the cron for this there is no intructions???

Derek Chai 01-12-2009 09:48 PM

Wait, how does the quene work? I heard you need visitors? What do you mean by manually? If I click run now it says processing etc.

Battle_Ring 01-12-2009 09:48 PM

nevermind i see it already sets it up for you.

Battle_Ring 01-12-2009 09:51 PM

When you send an email shouldnt it send the first batch right then, then the next bath at the tim you input. As of right now it doesnt send any when you first send it waits for the first que time to come around.

Anyway to change that?

Paul M 01-13-2009 09:22 AM

Quote:

Originally Posted by Derek Chai (Post 1710253)
Wait, how does the quene work? I heard you need visitors? What do you mean by manually? If I click run now it says processing etc.

Yes, the vb cron system requires that you actually have people visit your site.

Quote:

Originally Posted by Battle_Ring (Post 1710259)
When you send an email shouldnt it send the first batch right then, then the next bath at the tim you input. As of right now it doesnt send any when you first send it waits for the first que time to come around.

Its working correctly, thats what a cron job is, it runs every 10 mins.

Battle_Ring 01-13-2009 02:08 PM

i need mine to run every 1 hours as i can only email 200 times per hour

Paul M 01-13-2009 04:33 PM

No you dont. Please actually read the notes.

obmob 01-14-2009 12:47 AM

i have a 800 limit, but my webhost told me to use a 200 queue per hour, i'll try to set this up, awesome idea, must be part of vb 4.0 :D

Mr-Mo3ath 01-19-2009 11:51 AM

i have a proplem
i have to forums in my server the firs forum its sendeing aotumatic good
the secund forum when i doing send hes not send only manually and i update to 3.8 and the proplem its strel hes not send auto like the first form

Paul M 01-19-2009 12:18 PM

Sorry, not really sure what you are asking.

Mr-Mo3ath 01-19-2009 02:38 PM

for example in admincp the queue its 60000 user its not changed auto only Manuel
But in other site in same server its workinge good and i cheake the confige for email and evry tink

Mr-Mo3ath 01-21-2009 08:00 AM

???

Sworm 01-28-2009 07:13 PM

Hi all, for first, this mod is GREAT.....i've clicked installed!
I'm not expert ,
and i don't understand well the en language,
my forum can send 400 emails in 1 hour , for send 300 mails in 1 hour,
is correct if i go in my AdminCP/Vb Options/Email Options/
and set the Number of emails to send per batch at 5?
Without touch the delay option (set to "0" like default)?

Thats correct?

Please help me.

Thanks

Paul M 01-28-2009 09:08 PM

Set it to 50, not 5.

Sworm 01-28-2009 09:32 PM

Quote:

Originally Posted by Paul M (Post 1727558)
Set it to 50, not 5.


Thanks Paul,
only this?

The default number of that option is 10, but when i send (without your hack) i riceive "400 is the max email that i can to send" error,
if i increase this value , i will send more of 400 emails in one hour?

please help me,
without your mod i can't use my newsletter.

Mr-Mo3ath 01-31-2009 04:47 AM

now im uprdage other forum to 3.8.1
and the cron its send auto

please i want send to the information in pm o cheake on this

Paul M 01-31-2009 10:09 AM

Sorry, but I dont really understand either of you.

Mr-Mo3ath 01-31-2009 01:57 PM

Quote:

Originally Posted by Paul M (Post 1729813)
Sorry, but I dont really understand either of you.

sair the cron hes now send auto i have to send him Manuel only so i want send to you in privet meesage the login for my forums to cheake on this :)

almsloob 02-05-2009 01:02 AM

thank you.

obmob 02-09-2009 05:11 PM

Ok, finally installed... and i have a question, is it ok to set the Use Mailqueue System as "Yes with locking"? o.o

Paul M 02-09-2009 06:53 PM

If you want, that has no bearing on this mod.

obmob 02-10-2009 01:32 AM

Cool, well, i sent my first newsletter, this is a little site, so i set a really low number to test.

I'll search for the logs. Thanks :D

obmob 02-10-2009 03:26 PM

Hmm... well, i see there is a log as "Process Mail Queue for vBulletin 3.7"

But where cani see the mail queue or any chance to see how many mails were sent on each run? Oo

bklynjava 02-14-2009 10:47 PM

What would the settings look like to send 400 - 450 emails an hour. I was pretty sure I set it right at 75 emails every 10 min.

I tried it and must have done something wrong cause I am currently getting my suspension lifted for sending 1000's of emails.

joe1989 02-15-2009 06:25 AM

I'm sorry I don't really understand how to know what numbers to set the batch and processing times to.... My webhost allows me 100 emails per hour. What should I set everything to???

Thanks, and I'm sorry if this was answered already, I can't decipher some of this computer lingo...i'm no programmer!!

Thanks for a great mod!!

joe1989 02-15-2009 06:59 AM

Also, how do I view the mail queue, and see how many emails are currently queued for sending??

Quote:

This modification includes the code by Antivirus that displays the current size of the mail queue.
Where? How to access it?

joe1989 02-15-2009 07:24 AM

Quote:

Also, how do I view the mail queue, and see how many emails are currently queued for sending??
OK i see it in the ACP!! Nevermind!

Awesome Mod!

obmob 02-15-2009 05:02 PM

Quote:

Originally Posted by joe1989 (Post 1744604)
I'm sorry I don't really understand how to know what numbers to set the batch and processing times to.... My webhost allows me 100 emails per hour. What should I set everything to???

Thanks, and I'm sorry if this was answered already, I can't decipher some of this computer lingo...i'm no programmer!!

Thanks for a great mod!!

I think that would be toset the batch around 15

Quote:

Originally Posted by joe1989 (Post 1744622)
OK i see it in the ACP!! Nevermind!

Awesome Mod!

where, where? Oo

Can't figure out where to see it x_x

joe1989 02-15-2009 06:19 PM

After you've installed, it shows up with the quick stats in the admin cp.

If you just installed, you may need to reload the admin cp (by actually hitting reload or logging out and logging back in).

Take a look at my screenshot attached...

obmob 02-16-2009 04:15 PM

OMG! the last place I'd ever search x_x

thanks :D

transparent 02-24-2009 06:48 AM

God, this mod has been needed for way to long! It truly should be a default in VB. Thx a lot for making this Paul!!

zlos 02-28-2009 06:29 AM

Paul
Installed & clicked :)
One thought - maybe short help or some kind of how-to for setting a proper number of mails sent per batch, as this single setting is actually top important for proper batch mailing.

belal_najjar 03-06-2009 06:08 PM

heyy,

how can i start?

like sending 100 msj per hr and then activate it? or wt

Paul M 03-06-2009 08:07 PM

Huh ?


All times are GMT. The time now is 06:52 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01418 seconds
  • Memory Usage 1,809KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (8)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete