Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Mass Mail/Newsletters Via Cronjob Details »»
Mass Mail/Newsletters Via Cronjob
Version: 1.1, by Jafo232 Jafo232 is offline
Developer Last Online: Oct 2022 Show Printable Version Email this Page

Version: 3.5.3 Rating:
Released: 01-03-2006 Last Update: 01-05-2006 Installs: 32
DB Changes Uses Plugins
Additional Files  
No support by the author.

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?

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #42  
Old 02-19-2007, 08:25 PM
masterross's Avatar
masterross masterross is offline
 
Join Date: Nov 2005
Location: Bulgaria
Posts: 315
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

hi,

i've got this error after sending first mail:
Code:
DBD::mysql::db do failed: MySQL server has gone away at /root/list.cgi line 29.
Broken pipe DBI: MySQL server has gone away at /root/list.cgi line 29.
any help?
Reply With Quote
  #43  
Old 03-12-2007, 10:01 AM
rastler rastler is offline
 
Join Date: Jan 2006
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi,

I have a doubt,

If we use this Hack will the mails be sent twice, Once using the PERL file and the massmail table and second with existing mail system of vbMail ?

Rastler
Reply With Quote
  #44  
Old 12-18-2007, 01:02 PM
xcingix's Avatar
xcingix xcingix is offline
 
Join Date: Feb 2006
Location: Brooklyn, NY
Posts: 136
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by NxTek View Post
When trying to uninstall -

Database error in vBulletin 3.5.2:

Invalid SQL:
DROP massmail;

MySQL Error : You have an error in your SQL syntax near 'massmail' at line 1 Error Number : 1064
Date : Thursday, February 2nd 2006 @ 08:21:39 AM
Script : http://www.xxxx.com/forums/admincp/plugin.php
Referrer : http://www.xxxx.com/forums/admincp/p...s-Mail-Cron&s=
I have the same problem.
I have left this product in my instillation for years because I cant uninstall it.
Can someone help me uninstall this?
Reply With Quote
  #45  
Old 12-18-2007, 01:14 PM
UK Jimbo's Avatar
UK Jimbo UK Jimbo is offline
 
Join Date: Sep 2002
Posts: 249
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I've not ever installed this software but I'm pretty confident that the uninstall is trying to remove the massmail table from the database. In which case the correct syntax is:

Code:
DROP TABLE massmail;
Reply With Quote
  #46  
Old 12-18-2007, 01:25 PM
xcingix's Avatar
xcingix xcingix is offline
 
Join Date: Feb 2006
Location: Brooklyn, NY
Posts: 136
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by UK Jimbo View Post
I've not ever installed this software but I'm pretty confident that the uninstall is trying to remove the massmail table from the database. In which case the correct syntax is:

Code:
DROP TABLE massmail;
just run that query and it will be uninstalled?
Reply With Quote
  #47  
Old 12-18-2007, 01:35 PM
UK Jimbo's Avatar
UK Jimbo UK Jimbo is offline
 
Join Date: Sep 2002
Posts: 249
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by xcingix View Post
just run that query and it will be uninstalled?
No. You need to modify the uninstall code for the product.

Login to your admincp and go to "Manage Products"

Find this product and choose to edit it.

Look for the "DROP massmail" text in the uninstall code and replace it with "DROP TABLE massmail"

Save these changes and then try running the uninstall process again.
Reply With Quote
  #48  
Old 12-18-2007, 01:44 PM
xcingix's Avatar
xcingix xcingix is offline
 
Join Date: Feb 2006
Location: Brooklyn, NY
Posts: 136
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by UK Jimbo View Post
No. You need to modify the uninstall code for the product.

Login to your admincp and go to "Manage Products"

Find this product and choose to edit it.

Look for the "DROP massmail" text in the uninstall code and replace it with "DROP TABLE massmail"

Save these changes and then try running the uninstall process again.
this is the current uninstall though.
Code:
$db->query_write("DROP " . TABLE_PREFIX . "massmail");
Reply With Quote
  #49  
Old 12-18-2007, 01:54 PM
UK Jimbo's Avatar
UK Jimbo UK Jimbo is offline
 
Join Date: Sep 2002
Posts: 249
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Looks like it does just remove that table. To make it run correctly change it to the following:

Code:
$db->query_write("DROP TABLE " . TABLE_PREFIX . "massmail");
Reply With Quote
  #50  
Old 12-19-2007, 03:24 AM
xcingix's Avatar
xcingix xcingix is offline
 
Join Date: Feb 2006
Location: Brooklyn, NY
Posts: 136
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by UK Jimbo View Post
Looks like it does just remove that table. To make it run correctly change it to the following:

Code:
$db->query_write("DROP TABLE " . TABLE_PREFIX . "massmail");
still doesnt work
Code:
Database error in vBulletin 3.7.0 Beta 2:

Invalid SQL:
DROP TABLE massmail;

MySQL Error  : Unknown table 'massmail'
Error Number : 1051
Date         : Tuesday, December 18th 2007 @ 10:16:28 PM
Script       : http://forums.ny-dev.com/admincp/plugin.php?do=productkill
Referrer     : http://forums.ny-dev.com/admincp/plugin.php?do=productdelete&productid=Mass-Mail-Cron&s=
IP Address   : 69.112.68.55
Username     : danny.michel
Classname    : vb_database
Reply With Quote
  #51  
Old 12-24-2007, 06:46 AM
xcingix's Avatar
xcingix xcingix is offline
 
Join Date: Feb 2006
Location: Brooklyn, NY
Posts: 136
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

anyone?
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 10:59 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.06423 seconds
  • Memory Usage 2,325KB
  • Queries Executed 27 (?)
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
  • (7)bbcode_code
  • (5)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (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_postinfo_query
  • fetch_postinfo
  • 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
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • 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