The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Cron based e-mail sending Details »» | |||||||||||||||||||||||||
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
|
4 благодарности(ей) от: | ||
ahmedeldeep, need2fart, rpgamersnet, xorex |
Comments |
#292
|
|||
|
|||
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. |
#293
|
|||
|
|||
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 |
#294
|
|||
|
|||
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(); |
#295
|
|||
|
|||
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? |
#296
|
|||
|
|||
Quote:
|
#297
|
||||
|
||||
That is simply bypassing the mod.
|
#298
|
|||
|
|||
Please make it for vB 4.2. Thanks.
|
#299
|
|||
|
|||
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 |
#300
|
||||
|
||||
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). |
#301
|
|||
|
|||
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 |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|