View Full Version : Administrative and Maintenance Tools - Cron based e-mail sending
weindians
11-03-2010, 09:31 PM
ok... thanx for finding out that.... anyway now it has sent more mails as queue reduced to 3200+
FreshFroot
01-22-2011, 10:32 PM
The cron runs 6 times an hour (every 10 minutes), so 50 x 6 = 300 an hour, well under your 500/Hr - you are fine.
THIS ABOVE...
should be in your intro post.
I was looking for this to see how this work to add my setting...
No wonder users are confused...
You need to remember more than half the people here are NOT programmers. So they won't understand some of your terms. They just need straight answers :p
maznos
03-23-2011, 02:51 PM
Hello,
Does this hack work under 4.x
SVTCobraLTD
04-03-2011, 03:03 AM
Installed on 3.8.x but does not seem to be working correctly. Emails are all going out at once with no regard to my setting of only 40 per batch.
Paul M
04-03-2011, 10:05 AM
Which would suggest you missed doing something.
SVTCobraLTD
04-06-2011, 02:03 PM
Which would suggest you missed doing something.
Upload 1 item and import another. I don't see how that can be missed?
Paul M
04-06-2011, 04:05 PM
So you read this, and did it ?
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).
SVTCobraLTD
04-06-2011, 04:46 PM
I read the instructions you provided with the download and that is not stated anywhere.....
<!-- $Header: d:\cvs/3.8/Cron-mail-queue/Cron-mail-queue.txt,v 1.1 2008/10/05 15:15:58 pem Exp $ -->
Cron Mail Queue for vBulletin 3.8
---------------------------------
Step 1.
In admincp/email.php
find ;
vbmail($user['email'], $vbulletin->GPC['subject'], $sendmessage, true, $vbulletin->GPC['from']);
change to ;
vbmail($user['email'], $vbulletin->GPC['subject'], $sendmessage, false, $vbulletin->GPC['from']); // Paul M - Queue Admin Mail //
Step 2.
In includes/functions.php
find ;
exec_mail_queue();
change to ;
// exec_mail_queue(); // Paul M - Cron Mail Queue Hack //
Step 3.
Upload mailqueue.php to /includes/cron/
Step 4.
Import the product into vBulletin via the ACP Product Manager.
SVTCobraLTD
04-06-2011, 04:50 PM
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).
This is done with "Yes with locking" chosen and the value set to 40. Still all emails go through right away.
Paul M
04-06-2011, 11:04 PM
I read the instructions you provided with the download and that is not stated anywhere.....
Its in the main post of the thread.
This is done with "Yes with locking" chosen and the value set to 40. Still all emails go through right away.
Im afraid there is nothing more I can tell you. Without admin and ftp access I cannot check you have done everything correctly.
SVTCobraLTD
04-07-2011, 09:40 AM
Its in the main post of the thread.
I would highly recommend putting ALL of the instruction in the downloaded instructions instead of just some of the instruction there and the rest in the thread.
al98t
05-04-2011, 09:01 PM
installed, turned on, and set to 70. should put me around 420emails per hour!
thanks!
ctrlbrk
05-05-2011, 08:55 AM
Brilliant mod, I really needed this, thank you!
Mike
ctrlbrk
05-05-2011, 09:09 AM
BTW, would it please be possible to add a small bit of prioritization. Private Messages = highest, and Admin "Send email to users" (newsletters) = lowest.
I am sending over 10,000 email newsletter-type messages right now, which is fine if it takes a few hours. But not so cool if all private messages get delayed until this email blast is over.
There are currently 10,455 unsent emails remaining in the mail queue.
Mike
Paul M
05-05-2011, 10:06 AM
Sorry, there is no priority concept in vbulletin, adding one is beyond the scope of this mod.
ctrlbrk
05-05-2011, 10:14 AM
Sorry, there is priority concept in vbulletin, adding one is beyond the scope of this mod.
OK. Well, I am happy to pay you for it, or make a nice size donation to your favorite charity. I can't find any good programmers anymore, have gone thru ten in the last two years, thrown good money after bad, and in the end no one programmer can ever do things right. Most can't even reply to emails.
So if I could somehow convince you -- at minimum the Private Message thing, it is very important for me.
Thx for all the work you've done.
Mike
Paul M
05-05-2011, 11:01 AM
Oops, the word "no" was missing from my reply, not sure if you noticed that.
Adding a priority to the vb mail system would not be something that could be done by plugins, it would need code changes. Im afraid I simply dont have the time to look at such work (at least not unless you are very rich !).
SVTCobraLTD
05-08-2011, 03:43 PM
Still no go. I send 300 hundred at once. Admincp page says 300 being processed, hit refresh 260, hit refresh 220 and so on. I have the settings as described in the first post and instructions and it's still processing them 40 at a time instead of 40 every 10 minutes.
Paul M
05-08-2011, 04:05 PM
My previous reply still stands.
Im afraid there is nothing more I can tell you. Without admin and ftp access I cannot check you have done everything correctly.
arkueckelhan
10-19-2011, 10:14 PM
I have been looking for this solution forever now. I can not describe how happy I am that you created this.
Thank you,
[marked as installed]
viper357
10-26-2011, 05:20 AM
Hi Paul, quick question please.
I want to use this purely for when I send out bulk emails, so instead of installing and uninstalling each time, can I simply change from 'yes' to 'no' in the vb options for using the mailqueue system, will that then stop vb from using this mod and it will revert to sending out the emails normally? Or does this mod have to be removed before that will happen? Thanks.
Paul M
10-26-2011, 09:21 AM
As far as I'm aware that would work. Its a long while since i did anything with the e-mail system.
arkueckelhan
10-26-2011, 08:58 PM
I have a large forum (about 80,000). I installed the mod and set batch size (in Email options) to 70 with a 6 second delay, and to process every 10 mins in the scheduled tasks. When I attempt to send emails from ACP> Users> "Send emails to users" the process will begin and it shows me emails sending successfully every 6 seconds. (on that page Emails to send at once is set to 500).
Is it possible for me to NOT keep this page open? It would take it like 8 days to run and I'm certain it would timeout within an hour. How do I get this process to work after leaving the emailing page, or how do I get it to go to the queue so it can then be sent out slowly?
Paul M
10-26-2011, 10:06 PM
The only way you could do this is to set it to 0 while using the "Send emails to users" - it should then zoom through them at 500 a time (but is just adding them to the queue, not sending them). Once done, change the value back to 6. I would add that I think 6 is an excessivly large value to use.
arkueckelhan
10-26-2011, 10:47 PM
The only way you could do this is to set it to 0 while using the "Send emails to users" - it should then zoom through them at 500 a time (but is just adding them to the queue, not sending them). Once done, change the value back to 6. I would add that I think 6 is an excessivly large value to use.
Thanks for the assistance.
With such a huge memberbase as mine, would you suggest setting to 0, and then processing smaller batches every minute (rather than 10), so my server doesn't get bogged down?
And once all were added to the queue and changing the value back to 6, would that apply the 6 second delay to the processing of the queue?
Thanks Paul
Paul M
10-27-2011, 10:20 AM
With such a huge memberbase as mine, would you suggest setting to 0, and then processing smaller batches every minute (rather than 10), so my server doesn't get bogged down?
That would seem a better choice IMO.
And once all were added to the queue and changing the value back to 6, would that apply the 6 second delay to the processing of the queue?
Yes, it should.
arkueckelhan
10-27-2011, 12:25 PM
Thanks Paul. I'll run it today and let everyone know if that was successful!
pspcrazy
01-26-2012, 07:44 AM
Hi Paul I've been using this for a while, but for some reason my daily digest (email sent once a day) doesn't queue up even though mass mailing do.
I have set it to mailqueue on, and the system works fine other then the daily digest emails which timeout or cause high server load.
Any ideas?
Thanks for the great mod.
Paul M
01-26-2012, 11:18 AM
It would depend on whether vb queues them by default, this wont process them unless the original code queues them in the first place.
Selene
01-30-2012, 04:19 PM
I am running latest 3.8.7 and have over 150K members.
Will this work on the current latest 3.8.7
Paul M
01-30-2012, 04:37 PM
It will work on any 3.8.x
rpgamersnet
03-02-2012, 07:24 PM
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!
majidsr
05-24-2012, 10:18 AM
Paul, thanks very much for a welldone job
I installed it and it work 100%
Best Regards
christon26
07-18-2012, 03:11 AM
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?
Paul M
07-18-2012, 11:45 AM
No, there isnt.
christon26
07-22-2012, 08:20 AM
That's a shame lol thanx though :)
tommydamic68
08-07-2012, 10:20 PM
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
tommydamic68
10-26-2012, 05:09 PM
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.
Paul M
10-28-2012, 08:58 PM
This cannot slow down posting or replying, there is simply no connection between the two.
tommydamic68
10-29-2012, 12:26 AM
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.
kingbrend
02-03-2013, 09:21 PM
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.
microbob
02-15-2013, 05:31 PM
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
sa3eka.com
02-19-2013, 08:57 AM
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();
microbob
02-19-2013, 07:20 PM
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?
microbob
02-19-2013, 07:22 PM
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
Can someone please help me out here???:o
Paul M
02-20-2013, 06:13 PM
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();
That is simply bypassing the mod.
RFViet
03-20-2013, 01:27 PM
Please make it for vB 4.2. Thanks.
GoTTi
03-24-2013, 09:27 PM
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
Paul M
03-25-2013, 03:10 AM
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).
microbob
03-25-2013, 01:07 PM
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
GoTTi
03-25-2013, 03:42 PM
ya I set
Number of Emails to Send Per Batch to 80. so that was right
Paul M
03-25-2013, 06:20 PM
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?
From what I have read, you will need someone to spend time checking your actually installation, there is nothing obviously wrong in your posts.
Im afraid I simply do not have the time to do that atm.
GoTTi
03-27-2013, 05:29 PM
paul it has taken days to send these emails....and there is still 1000 remaining. am I missing something?
Paul M
03-29-2013, 01:51 AM
Maybe you dont have enough traffic to trigger the cron system every 10 minutes.
Other than that, no idea really, many things could affect it.
SVTCobraLTD
12-23-2014, 10:50 AM
Working in 3.8.8.
adwade
04-05-2015, 10:03 PM
When making the file revisions, I could not find the string: exec_mail_queue(); (within includes/functions.php)
Nevermind, as when I FTP'd my functions.php file the connection stalled and I did not get the entire file.(i.e. just 164kb out of 177kb) Once I discovered that and re-downloaded the file, I found the string I needed to edit then!
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.