Register Members List Search Today's Posts Mark Forums Read

Reply
 
Mod Options
Mass Mail/Newsletters Via Cronjob Details »
Mass Mail/Newsletters Via Cronjob
Mod Version: 1.1, by Jafo232 (Coder) Jafo232 is offline
Developer Last Online: Jan 2020 I like it Show Printable Version Email this Page

This modification is in the archives.
vB Version: 3.5.3 Rating: (2 votes - 5.00 average) Installs: 32
Released: 04 Jan 2006 Last Update: 06 Jan 2006 Downloads: 81
Supported DB Changes Uses Plugins Additional Files  

For those of you who use the "Send Email to Users" function in the admin cp may have noticed it is less than efficient. This is really not the Vbulletin teams fault, it is just the fact that sending a lot of emails via PHP is like emptying lake with a bucket.

For administrators with a very large user base, sending email this way is not only very time consuming, but can be taxing on a servers resources.

With this extension, you can save your mass mailings or newsletters in a batch that can be sent at any time you wish, or on a schedule using a program like crontab.

You can even use a separate server to send the email if you wish.

Version 1.1 now supports the hack Send HTML via admin CP so you can batch mail HTML emails.



Requirements:

Perl (Some hosts call this CGI) w/ the DBI module (MySQL driver)
Net::SMTP module IF you plan on using SMTP (common Perl module)
Sendmail or SMTP
Access to crontab (for scheduled processing)
Telnet/SSH access to your server (for testing purposes only)

As for Telnet/SSH access, you will most likely need this unless you can schedule a cronjob via your servers admin GUI.


CHANGELOG:

01/05/2005: Added support for SMTP
01/05/2005: Modified code to include Vbulletin generated mail headers and encoding


Installation (detailed in readme file):

Install the product via your admin cp.

Open the list.cgi file and edit the database variables and upload to server IN ASCII MODE. Do not use Binary or Auto mode to upload list.cgi. You should upload this file in an area that is NOT accessible by a web browser.

Click Install

That is it. If you wish to use scheduled batches then you will have to set up a cronjob to execute the list.cgi file.

You can execute the list.cgi file any time you wish on your server like so:

"perl list.cgi"



What does this do exactly?:

In a nutshell, when you enter a message into the mass mail feature of Vbulletin, it saves the message details to a new table created by the product (massmail). When list.cgi is executed, it will go through this table and email everyone in the table and delete their entry after the mail is sent.



Usage:

The only thing you should do differently is set the "Emails to send at once" value to at least the amount of users you have registered. It defaults at 500 but the whole point of this hack is to eliminate having to send email in blocks and wait for the process to finish. Just set it to a real high number.



To Do:

For those Windows servers, I suppose the Send_Mail routine could use SMTP. This is not hard to do I just never use Windows servers so what's the point?

Download Now

Only licensed members can download files, Click Here for more information.

Show Your Support

  • To receive notifications regarding updates -> Click to Mark as Installed.
  • If you like this modification support the author by donating.
  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Similar Mod
Mod Developer Type Replies Last Post
Set mass moving / pruning of threads as a cronjob Stadler vBulletin 3.0 Beta Releases 3 06 Aug 2004 03:04

  #16  
Old 10 Jan 2006, 02:34
BWilliams BWilliams is offline
 
Join Date: Dec 2005
Getting this error:

MySQL said:

#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '$db->query_write("CREATE TABLE IF NOT EXISTS " . TABLE_PREFIX .
Reply With Quote
  #17  
Old 10 Jan 2006, 06:09
Jafo232 Jafo232 is offline
 
Join Date: May 2004
I cannot reproduce that error. Perhaps when you unziped the file, it was corrupted?
Reply With Quote
  #18  
Old 11 Jan 2006, 12:59
kadafi_alive kadafi_alive is offline
 
Join Date: Dec 2004
Hey, is it possible to incoporate this with the Vb Commbull (newsletter) hack?
Reply With Quote
  #19  
Old 11 Jan 2006, 18:33
Jafo232 Jafo232 is offline
 
Join Date: May 2004
Originally Posted by kadafi_alive
Hey, is it possible to incoporate this with the Vb Commbull (newsletter) hack?
I am unsure, do you have a link to this hack?
Reply With Quote
  #20  
Old 12 Jan 2006, 10:31
groberthall groberthall is offline
 
Join Date: Jan 2005
I would also like to see a combination hack.... Commbull by cron......ummm

the lunk is
http://www.vbulletin.org/forum/showt...light=commbull
__________________
Regards
Graham.
TheVIPzone.org ( A work in progress )
The Visually Impaired Community Site.
Reply With Quote
  #21  
Old 13 Jan 2006, 00:07
Keyser Söze's Avatar
Keyser Söze Keyser Söze is offline
 
Join Date: Apr 2002
this isnt a newsletter its more of an enhancement to the sendmail function in the admin cp
Reply With Quote
  #22  
Old 13 Jan 2006, 10:23
Jafo232 Jafo232 is offline
 
Join Date: May 2004
I do not think it will work with that hack, sorry.
Reply With Quote
  #23  
Old 13 Jan 2006, 11:33
ChurchMedia's Avatar
ChurchMedia ChurchMedia is offline
 
Join Date: Dec 2002
Real name: Tim Eason
This is cool. Could it be modified to work with the Community Bulletin Email Generator hack?

Thanks!
Reply With Quote
  #24  
Old 13 Jan 2006, 11:34
Jafo232 Jafo232 is offline
 
Join Date: May 2004
Originally Posted by ChurchMedia
This is cool. Could it be modified to work with the Community Bulletin Email Generator hack?

Thanks!
Please read like 4 posts up..
Reply With Quote
  #25  
Old 20 Jan 2006, 01:13
globalinsites globalinsites is offline
 
Join Date: Oct 2002
Great hack. I will put it on my list of hacks to install. Does this work for the combull community bulletin hack too? Or can it be made to work with the combull community hack too? Whenever I use the combull hack I can send a maximum of 1300 at a time. If for example I try to send 1500 at a time then it usually freezes after a while and I have to start over again.

Edit: Oops, sorry. I used quick reply before I read the page with the latest posts..
Reply With Quote
  #26  
Old 21 Jan 2006, 08:26
ChurchMedia's Avatar
ChurchMedia ChurchMedia is offline
 
Join Date: Dec 2002
Real name: Tim Eason
Just FYI, I used this to try to send out 28,000 newsletters. It killed my server and MySQL is dead and won't restart. When it was working it would send out 5-10 emails to the same person every once and a while. My site is down now. I'm not sure what caused it exactly, but I'll have to stick to my other mail program.
Reply With Quote
  #27  
Old 01 Feb 2006, 18:41
NxTek NxTek is offline
 
Join Date: Jun 2003
I'd like to use this to send out a monthly reminder. If this is setup as a cron and I'd like to send out other mass mails throughout the month, won't it resend those too?

Unless I'm misunderstanding something, I don't see how this automates things if the message has to be entered into the admincp.
Reply With Quote
  #28  
Old 01 Feb 2006, 18:47
Jafo232 Jafo232 is offline
 
Join Date: May 2004
Originally Posted by NxTek
Unless I'm misunderstanding something, I don't see how this automates things if the message has to be entered into the admincp.
Because when you send a message through the admincp, you have to keep clicking on pages until all the mail is sent. Get a site with thousands of users, this could take all day.
Reply With Quote
  #29  
Old 01 Feb 2006, 18:52
NxTek NxTek is offline
 
Join Date: Jun 2003
The only thing you should do differently is set the "Emails to send at once" value to at least the amount of users you have registered. It defaults at 500 but the whole point of this hack is to eliminate having to send email in blocks and wait for the process to finish. Just set it to a real high number.
So why not just do that to begin with? That's what I do manually every month. I set it to 10000 and send the mail.
Reply With Quote
  #30  
Old 01 Feb 2006, 18:58
Jafo232 Jafo232 is offline
 
Join Date: May 2004
Originally Posted by NxTek
So why not just do that to begin with? That's what I do manually every month. I set it to 10000 and send the mail.
Well for one thing, chances are your server times out before all the emails are sent. Many servers only allow a PHP script to execute for X amount of seconds before its process is killed. In fact, it is a setting in the php.ini file.

If you have a lot of users, it could take quite a long time before it can send to all those users, and most likely, will time out.

See http://us3.php.net/manual/en/ref.inf...execution-time

For more information
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Mod Options

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


New To Site? Need Help?

All times are GMT. The time now is 19:44.

Layout Options | Width: Wide Color: