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

Reply
 
Thread Tools
Email reminder for inactive users Details »»
Email reminder for inactive users
Version: 1.2.7, by C Braithwaite C Braithwaite is offline
Developer Last Online: Dec 2012 Show Printable Version Email this Page

Category: Mini Mods - Version: 3.6.8 Rating:
Released: 02-08-2007 Last Update: 08-23-2008 Installs: 1463
DB Changes Uses Plugins Auto-Templates
Additional Files Translations Is in Beta Stage  
No support by the author.

Inactive reminder emails. This mod was designed to send out a reminder to inactive members to try and win them back.

***1.2.7 Update***
This update includes built in support for bouncing emails. The script will automatically detect the bounced mail, mark it as bounced so the user is not to be contacted again so as to avoid spam, and then move that user into a seperate usergroup. This plugin is still in it's testing stages, but I have addressed the bugs mentioned previously regarding the emailing side of things.

This is important so keep reading
To install this plugin and take advantage of the bounced email features you are going to need to follow these instructions very carefully. I can not gaurentee that they will work to the letter as this will be based on each persons individual hosting settings.

Step 1: Pre Install
Before you touch this product you need to do the following
  • Create an "inactive" usergroup
  • Set up a "bounce to" email address
    Pick an email address that you want to use as your bounced email address. Im using "bounce@icora.co.uk". feel free to use whatever you wish.
  • Add a email message filter
    This is the hard part. You need to set up a filter that will 'pipe' an email sent to the above email address.
    I am using Cpanel 11 and this is how i have mine set up:
    Rules: 'To' 'Equals' 'bounce@icora.co.uk'
    Actions: 'Pipe to program' with the setting: |/usr/local/bin/php /home/icora/public_html/forum/bounce.php
    This will depend entirely on your settings and structure so you may have to do a little research. It would be very helfull if people who have to use diferent configurations would post them on here.
  • Go into vBulletin options, and find the options for 'Emails'. there is a setting asking you if you want to use '-f'. set this to yes.
  • While still inn the email options set the 'Bounce Email Address' to your above address.
Step 2: Install
Remove all previous trace of this modification, and upload all the files in the "upload" folder to your base directory of the server.
Go into your product management section and add a new product. upload the XML file with overwrite selected.
Refresh your admin CP to load the new menu items. Just under the "users" group you will find an "Inactive Reminders" group. open that up and click on settings.
Play with these settings and options to suit for the most part. when you come down to the bounce settings you MUST use the same email address as the one you created above.
Set to active and save.

I must re-iterate that this version has not been widely tested, but the simulations i have ran have worked. I look forward to your feedback!

Features:
  • Select the period of time before a user is considered inactive.
  • Select how many emails to send to each inactive user per inactivity period
  • Choose weather inactivity is based on members "Last Post" or their "Last Visit"
  • Specify how often followup emails are sent
  • Specify alternative emails to send to reduce repetition
  • Keep a log of all inactive users contacted

Planned Updates:
  • More detail in reports
  • ...such as
  • Which useres returned
  • Effectivness stats
  • Email validity

**1.2.1 Update***
Added more detail to the reports section. You can now see the email address, and quickly indicate which emails were invalid. You can link directly to that user to edit as you wish.
I have fixed some errors which have been crashing people's database. Please post any problems if you can.

**1.2.3 Update***
Fixed several problems with escaping strings
Stopped database errors locking up site
***

**1.2.4 Update***
Added a "From Email" so you can specify your own email address to send the reminders from.
Fixed potential bug for people who do not use the mail queue.

Anyone having problems with sending emails out too fast, and multiple emails being sent need to consider changing their email settings in vbulletin options.
People with emails going out too fast - edit Number of Emails to Send Per Batch to a lower amount
People with multiple emails sending - edit Use Mailqueue System to "Yes, with locking"
***

**1.2.5 Update***
Added more stats in the reports page, also added a "Send test email" option so users can test the functionality of the mod
***

Supporters / CoAuthors

Show Your Support

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

Comments
  #1112  
Old 03-17-2008, 05:21 PM
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Posts: 2,601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Gersfan View Post
Am I meant to run Cron tasks for something with this? or does it do it all itself..

I created a User for testing, Set the emails to 1 Day, I've waited nearly 48 hours and I'm not got any emails..

Thanks,
Check the cron settings in Admin CP | Scheduled Tasks - think the default is way too often, if memory serves.

I don't get email notifications of the emails sent out either - I may have disabled that as an option, not sure.

You say you just created the user and "set the emails to 1 Day" - what does that mean? Which version are you using and specifically which setting did you make "1 day"?
Reply With Quote
  #1113  
Old 03-18-2008, 07:48 AM
Gersfan Gersfan is offline
 
Join Date: Dec 2007
Posts: 150
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm using VB 3.6.8 and the version of this mod i'm using is 1.11.

Settings:

Product Active: Yes
Days of Inactivity: 1
Email Frequency: 1
Inactivity based on last post: Yes

The reason I've set it to 1 was only for testing it out..

I set the Scheduled Task to Run and I got this..

Inactive User Reminder Emails
Found 0 Inactive Users.
Done

Thanks,
Reply With Quote
  #1114  
Old 03-18-2008, 10:34 AM
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Posts: 2,601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Uninstall 1.11 and install 1.09.
Reply With Quote
  #1115  
Old 03-18-2008, 02:17 PM
Forum Lover Forum Lover is offline
 
Join Date: Jun 2007
Location: Sydney
Posts: 503
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it working with 3.7?
Reply With Quote
  #1116  
Old 03-18-2008, 05:00 PM
Zaiaku's Avatar
Zaiaku Zaiaku is offline
 
Join Date: Jul 2007
Location: 3rd Level of Hell
Posts: 502
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Forum Lover View Post
Is it working with 3.7?
I just stated that the other day. Yes it does. I'm running 3.7 beta 6 and its working just fine.
Reply With Quote
  #1117  
Old 03-24-2008, 05:24 AM
BlueBulletRL BlueBulletRL is offline
 
Join Date: Apr 2005
Posts: 91
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i have this on a 3.6.8 Level 2 board and according to the cron log it is saying No Emails to send. I just set it to try and send an email to my test account but I've never recieved an email. any other way i can test this? I would love this to work as I have many members i would love to try and get them back.
Reply With Quote
  #1118  
Old 03-24-2008, 11:40 AM
DieselTruck DieselTruck is offline
 
Join Date: Feb 2008
Location: TN
Posts: 214
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by BlueBulletRL View Post
i have this on a 3.6.8 Level 2 board and according to the cron log it is saying No Emails to send. I just set it to try and send an email to my test account but I've never recieved an email. any other way i can test this? I would love this to work as I have many members i would love to try and get them back.
Seems to be working fine for me.

In my Settings:

Days of Inactivity: 7

Email Freq: 9

Usergroups to Send Email: 2 (My Registered Users)
Reply With Quote
  #1119  
Old 03-24-2008, 06:10 PM
BlueBulletRL BlueBulletRL is offline
 
Join Date: Apr 2005
Posts: 91
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I have it set to 1 day inactivity email 2 and usergroups is 2 for registered users still not working for me.
Reply With Quote
  #1120  
Old 03-26-2008, 11:30 AM
Martin-TMGRS Martin-TMGRS is offline
 
Join Date: May 2005
Location: Coventry
Posts: 74
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When I run the scheduled task manager I keep getting this come up, any ideas please. I've uninstalled 1.11 and reinstalled 1.09 and then done the same back to 1.11 again but still getting this error on both ver's

Inactive User Reminder Emails
db)) { exit; } error_reporting(E_ALL & ~E_NOTICE); if($vbulletin->options['reminder_active']){ $now = time(); $datetime = array(); $quantity = $vbulletin->options['quantity']; $datetime[lastpost] = $now - (60 * 60 * 24 * $vbulletin->options['inactivity']); $datetime[lastemail] = $now - (60 * 60 * 24 * $vbulletin->options['frequency']); $usergroups = explode(",",$vbulletin->options['usergroups']); if($vbulletin->options['reminder_posts']){ $result = $vbulletin->db->query_read("SELECT * FROM " . TABLE_PREFIX . "user WHERE lastpost < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16"); //print("SELECT * FROM " . TABLE_PREFIX . "user WHERE lastpost < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16
"); $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET emailDate = '$now' WHERE lastpost < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16"); //print("UPDATE " . TABLE_PREFIX . "user SET emailDate = '$now' WHERE lastpost < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16
"); } else { $result = $vbulletin->db->query_read("SELECT * FROM " . TABLE_PREFIX . "user WHERE lastactivity < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16"); //print("SELECT * FROM " . TABLE_PREFIX . "user WHERE lastactivity < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16
"); $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET emailDate = '$now' WHERE lastactivity < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16"); //print("UPDATE " . TABLE_PREFIX . "user SET emailDate = '$now' WHERE lastactivity < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16
"); } print("Found " . mysql_num_rows($result) . " Inactive Users.

"); while($row = $vbulletin->db->fetch_array($result)){ if(is_member_of($row, $usergroups)){ print("Sent To: $row[username]
"); $username = $row[username]; $toemail = $row[email]; $userid = $row[userid]; $bbtitle = $vbulletin->options['bbtitle']; $homeurl = $vbulletin->options['homeurl']; $forumurl = $vbulletin->options['bburl']; $hometitle = $vbulletin->options['hometitle']; eval('$message = "' . addslashes($vbulletin->options['message']) . '";'); $message = stripslashes($message); //$headers = "MIME-Version: 1.0" . "\r\nContent-type: text/html; charset=iso-8859-1" . "\r\n"; $uheaders .= "To: $username <$email>" . "\r\n"; $uheaders .= "From: " . $vbulletin->options['bbtitle'] . " Reminder Service <" . $vbulletin->options['webmasteremail'] . ">" . "\r\n"; eval('$subject = "' . addslashes($vbulletin->options['subject']) . '";'); $subject = stripslashes($subject); if($vbulletin->options['reminder_emailfooter']){ $message = $message . "Email Reminder System Provided By Mished.co.uk"; } /*if(@mail($email, $subject, $message, $headers)){ print("mailing $email (done)
"); } else { print("mailing $email (failed)
"); }*/ if(is_valid_email($toemail)){ $sentlist .= "$username "; vbmail($toemail, $subject, $message, $notsubscription = false, $from = $vbulletin->options['bbtitle'], $uheaders = '', $username = ''); } else { $failedlist .= "$username "; } } } if($sentlist == ""){ log_cron_action("No Emails to send", $nextitem); vbmail($vbulletin->options['webmasteremail'], "Inactive User Reminder Email Report", "This email shows that the product is installed and working as it should be.\n\n\nThere were no inactive users at this time.", $notsubscription = false, $from = $vbulletin->options['bbtitle'], $uheaders = "From: " . $vbulletin->options['bbtitle'] . " Reminder Service <" . $vbulletin->options['webmasteremail'] . ">" . "\r\n", $username = ''); } else { log_cron_action("Emails sent to:$sentlist. We tried to email the following users, but their email address was invalid:$failedlist", $nextitem); vbmail($vbulletin->options['webmasteremail'], "Inactive User Reminder Email Report", "This email shows that the product is installed and working as it should be.\n\n\nEmails sent to:" . $sentlist . ". We tried to email the following users, but their email address was invalid:" . $failedlist . "", $notsubscription = false, $from = $vbulletin->options['bbtitle'], $uheaders = "From: " . $vbulletin->options['bbtitle'] . " Reminder Service <" . $vbulletin->options['webmasteremail'] . ">" . "\r\n", $username = ''); } } else { print("Product is inactive at this time!"); } ?>

Done
Reply With Quote
  #1121  
Old 03-26-2008, 12:18 PM
djbaxter djbaxter is offline
 
Join Date: Aug 2006
Location: Ottawa, Canada
Posts: 2,601
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Martin-TMGRS View Post
When I run the scheduled task manager I keep getting this come up, any ideas please. I've uninstalled 1.11 and reinstalled 1.09 and then done the same back to 1.11 again but still getting this error on both ver's

Inactive User Reminder Emails
db)) { exit; } error_reporting(E_ALL & ~E_NOTICE); if($vbulletin->options['reminder_active']){ $now = time(); $datetime = array(); $quantity = $vbulletin->options['quantity']; $datetime[lastpost] = $now - (60 * 60 * 24 * $vbulletin->options['inactivity']); $datetime[lastemail] = $now - (60 * 60 * 24 * $vbulletin->options['frequency']); $usergroups = explode(",",$vbulletin->options['usergroups']); if($vbulletin->options['reminder_posts']){ $result = $vbulletin->db->query_read("SELECT * FROM " . TABLE_PREFIX . "user WHERE lastpost < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16"); //print("SELECT * FROM " . TABLE_PREFIX . "user WHERE lastpost < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16
"); $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET emailDate = '$now' WHERE lastpost < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16"); //print("UPDATE " . TABLE_PREFIX . "user SET emailDate = '$now' WHERE lastpost < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16
"); } else { $result = $vbulletin->db->query_read("SELECT * FROM " . TABLE_PREFIX . "user WHERE lastactivity < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16"); //print("SELECT * FROM " . TABLE_PREFIX . "user WHERE lastactivity < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16
"); $vbulletin->db->query_write("UPDATE " . TABLE_PREFIX . "user SET emailDate = '$now' WHERE lastactivity < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16"); //print("UPDATE " . TABLE_PREFIX . "user SET emailDate = '$now' WHERE lastactivity < '$datetime[lastpost]' AND emailDate < '$datetime[lastemail]' AND options & 16
"); } print("Found " . mysql_num_rows($result) . " Inactive Users.

"); while($row = $vbulletin->db->fetch_array($result)){ if(is_member_of($row, $usergroups)){ print("Sent To: $row[username]
"); $username = $row[username]; $toemail = $row[email]; $userid = $row[userid]; $bbtitle = $vbulletin->options['bbtitle']; $homeurl = $vbulletin->options['homeurl']; $forumurl = $vbulletin->options['bburl']; $hometitle = $vbulletin->options['hometitle']; eval('$message = "' . addslashes($vbulletin->options['message']) . '";'); $message = stripslashes($message); //$headers = "MIME-Version: 1.0" . "\r\nContent-type: text/html; charset=iso-8859-1" . "\r\n"; $uheaders .= "To: $username <$email>" . "\r\n"; $uheaders .= "From: " . $vbulletin->options['bbtitle'] . " Reminder Service <" . $vbulletin->options['webmasteremail'] . ">" . "\r\n"; eval('$subject = "' . addslashes($vbulletin->options['subject']) . '";'); $subject = stripslashes($subject); if($vbulletin->options['reminder_emailfooter']){ $message = $message . "Email Reminder System Provided By Mished.co.uk"; } /*if(@mail($email, $subject, $message, $headers)){ print("mailing $email (done)
"); } else { print("mailing $email (failed)
"); }*/ if(is_valid_email($toemail)){ $sentlist .= "$username "; vbmail($toemail, $subject, $message, $notsubscription = false, $from = $vbulletin->options['bbtitle'], $uheaders = '', $username = ''); } else { $failedlist .= "$username "; } } } if($sentlist == ""){ log_cron_action("No Emails to send", $nextitem); vbmail($vbulletin->options['webmasteremail'], "Inactive User Reminder Email Report", "This email shows that the product is installed and working as it should be.\n\n\nThere were no inactive users at this time.", $notsubscription = false, $from = $vbulletin->options['bbtitle'], $uheaders = "From: " . $vbulletin->options['bbtitle'] . " Reminder Service <" . $vbulletin->options['webmasteremail'] . ">" . "\r\n", $username = ''); } else { log_cron_action("Emails sent to:$sentlist. We tried to email the following users, but their email address was invalid:$failedlist", $nextitem); vbmail($vbulletin->options['webmasteremail'], "Inactive User Reminder Email Report", "This email shows that the product is installed and working as it should be.\n\n\nEmails sent to:" . $sentlist . ". We tried to email the following users, but their email address was invalid:" . $failedlist . "", $notsubscription = false, $from = $vbulletin->options['bbtitle'], $uheaders = "From: " . $vbulletin->options['bbtitle'] . " Reminder Service <" . $vbulletin->options['webmasteremail'] . ">" . "\r\n", $username = ''); } } else { print("Product is inactive at this time!"); } ?>

Done
This seems to be displaying the contents of the cron job. It doesn't appear to be a problem with this add-on. My guess is that your server is misconfigured in some way.

Are ANY cron jobs running successfully on your installation?
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 06:25 PM.


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.05137 seconds
  • Memory Usage 2,353KB
  • Queries Executed 26 (?)
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
  • (4)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
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (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_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