vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.6 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=194)
-   -   Mini Mods - Email reminder for inactive users (https://vborg.vbsupport.ru/showthread.php?t=138946)

djbaxter 06-17-2007 05:50 PM

Are you using 1.11?

If so, uninstall it and install 1.09.

bbcentral 06-17-2007 06:35 PM

Yeah I'm using 1.11, but now that I've made all these fixes and enhancements, and it's working perfectly, it seems pointless to revert :)

So far I've received 400 bounces, but it's definitely getting through to people. And the report is sitting in the vb_mailqueue table ready to send, once the other 9000 emails are finished.

Quote:

The Inactive User Reminder System successfully ran today.
This report contains more information.

--------------------------------

Reminders Sent: 1637
Not Sent: 0
Total Inactive: 1637

--------------------------------

Reminder Emails sent to:
11377) JoeSmith
11376) JohnDoe
11375) Member1234
etc etc etc...
I'm extremely happy with it, you have no idea how much I love this mod :D

The only thing I need now is another automated script for actually pruning the accounts.
*If you haven't logged in for the last 30 days, you'll get the reminder email.
*If you haven't logged in for the last 53 days, you'll get the reminder email again.
*If you haven't logged in for the last 60 days, and you have never posted, you'll be deleted
*If you haven't logged in for the last 60 days, and you have posted, nothing happens, except you will obviously receive an email reminder every 30 days forever, or until you request removal of your account :)

I'm thinking about customising that part of the mod anyway, so there's 2 different messages based on what the lastactivity was. "Your account will be deleted in 30 days", "Your account will be deleted in 7 days". This needs to be based on their postcount, because I won't be automatically deleting any member who has posted on the forum.

djbaxter 06-18-2007 12:52 AM

Quote:

Originally Posted by bbcentral (Post 1270468)
The only thing I need now is another automated script for actually pruning the accounts.

EZ Bounce

bbcentral 06-18-2007 08:14 AM

Quote:

Originally Posted by djbaxter (Post 1270628)

Nope, that's not what I mean. I don't want to just delete accounts who have bounced emails, I want to delete anyone who hasn't logged in for 60 days and has never made a post.
My site requires a login to download mp3s and videos, same account as the forum. So I have a lot of people who sign up, download my files and never come back. I want to email them after 30 days, then again after 60, and then if they haven't visited or posted I want to delete their account permanently. And it would need to be automated because I don't have time to login every day and manually delete anybody who hasn't logged in for a while.

I think I'll need to write this one myself, but I'm also working on an unsubscription system for my forum. Any emails (like the inactive users one) will contain an unsubscribe link to make it easier for them.

kollam003 06-18-2007 08:57 AM

Installed Thanks :)

djbaxter 06-18-2007 12:44 PM

Quote:

Originally Posted by bbcentral (Post 1270802)
Nope, that's not what I mean. I don't want to just delete accounts who have bounced emails, I want to delete anyone who hasn't logged in for 60 days and has never made a post.
My site requires a login to download mp3s and videos, same account as the forum. So I have a lot of people who sign up, download my files and never come back. I want to email them after 30 days, then again after 60, and then if they haven't visited or posted I want to delete their account permanently. And it would need to be automated because I don't have time to login every day and manually delete anybody who hasn't logged in for a while.

I think I'll need to write this one myself, but I'm also working on an unsubscription system for my forum. Any emails (like the inactive users one) will contain an unsubscribe link to make it easier for them.

1. EZ Bounce will do what you want, with a safety measure. Set up an "Bad email" group. EZ Bounce will move members with bad email addresses to that group. You can then manually inspect and delete those members, or run a simple SL query to delete members of that group.

2. You don't need to write your own add-on to do the unsubscribe thing. Customize the inactive email sent by this add-on to include instructions for unsubscribing (do this in the vBulletin options for the add-on). Here's mine:

Code:

Hello, $username!

<p>You are receiving this email because you previously registered at the YOUR FORUM NAME with the following information:</p>

<p>Member name: $username<br>
User number: $userid<br>
Email address: $email</p>

<p>It's been some time since your last visit to our FORUM community.</p>

<p>You might be interested in having another look. We have added several features and enhancements to the forums, and many new topics and new members are added every day.</p>

<p>If you don't remember your password, you can request it here: <a href="http://WWW.YOURFORUM.COM/login.php?do=lostpw">http://WWW.YOURFORUM.COM/login.php?do=lostpw</a></p>.

<p>We hope to see you back soon.</p>

<p>If you do not wish to receive further emails of this nature, please log into your UserCP at <a href="http://WWW.YOURFORUM.COM/profile.php?do=editoptions">http://WWW.YOURFORUM.COM/profile.php?do=editoptions</a> and uncheck the box next to Receive Email from Administrators.</p>


bbcentral 06-19-2007 10:47 AM

Quote:

Originally Posted by djbaxter (Post 1270939)
1. EZ Bounce will do what you want, with a safety measure. Set up an "Bad email" group. EZ Bounce will move members with bad email addresses to that group. You can then manually inspect and delete those members, or run a simple SL query to delete members of that group.

But there are more reasons why I would want to delete an account than just a bad email address, that's only a tiny fraction of the problem. I also need to delete people who have not logged in or posted in over a particular amount of time.
I had a good look at EZ Bounce, what it does and how it works, and it just doesn't suit my requirements at all, not even slightly.

Quote:

Originally Posted by djbaxter (Post 1270939)
2. You don't need to write your own add-on to do the unsubscribe thing. Customize the inactive email sent by this add-on to include instructions for unsubscribing (do this in the vBulletin options for the add-on). Here's mine:

It's a nice email, but I really want something much simpler which involves a single click to unsubscribe, like:
website.com/forum/u/?e=user@domain.com&s=hj289h238hsdkjh
That would put their account in the "PendingDeletion" usergroup, send them a confirmation email, and within 24 hours a CRON job would delete the account. They would also be able to cancel the deletion request using the same page.
It doesn't require retrieving passwords or logging in to the forum, I want it to be as simple as possible. I realise this might sound like overkill, but it would fit in with my site a lot better.
If their account has posts on the forum then it wouldn't delete it, but they'd be able to click a button to request deletion (which would simply notify me and I could do it manually for them). But that's not a big problem.

I sent out 12,000 emails to all my members the other night, and while 2000 bounced back to me, I also had a lot of people who wanted their accounts deleted. If they're not ever going to login, never going to post, and never want me to email them, then I may as well just delete them permanently and keep my database clean. The more I can automate, the less time I'll have to waste on daily maintenance.

bryanb 06-20-2007 07:06 AM

Quote:

Originally Posted by djbaxter (Post 1266147)
It uses the email address you set for your forum. Change it in basic vBulletin options.

I've had the same problem - the From: field was "the title of the forum"@myserver.net instead of the email address I use for everything else.

I don't have the SMTP Email enabled - could this be it? I've checked all the other options, and I don't see where I've missed anything.

Used it for the first time this morning, it sent out a little over 7000 emails. I'd like to see which ones bounced (or click here to get through the spam filter) :)

And a previously inactive guy started a new thread. Thanks! :up:

bbcentral 06-20-2007 07:31 AM

Quote:

Originally Posted by bryanb (Post 1272301)
I've had the same problem - the From: field was "the title of the forum"@myserver.net instead of the email address I use for everything else.

I don't have the SMTP Email enabled - could this be it? I've checked all the other options, and I don't see where I've missed anything.

Used it for the first time this morning, it sent out a little over 7000 emails. I'd like to see which ones bounced (or click here to get through the spam filter) :)

And a previously inactive guy started a new thread. Thanks! :up:

You haven't missed anything, it's a bug in the code.
I fixed it by changing line 69 in remindermail.php from this:
Code:

vbmail($toemail, $subject, $message, $notsubscription = false, $from = $vbulletin->options['bbtitle'], $uheaders = '', $username = '');
To this:
Code:

vbmail($toemail, $subject, $message);
You don't need the headers or anything like that, even the default vBulletin email scripts in the cron folder don't add custom headers.

If I'd known that the return address was screwed I would have fixed it first before sending out my emails, but all the bounces went to nobody@server.mywebsite.com. So I had to login and forward all those emails to my other account.

My changes to the code are working perfectly, every day since I installed it I've received a summary email like this:
Quote:

The Inactive User Reminder System successfully ran today.
This report contains more information.

--------------------------------

Reminders Sent: 5
Not Sent: 0
Total Inactive: 5

--------------------------------

Reminder Emails sent to:
1951) JoeSmith
4507) JohnSmith
10715) JohnDoe
11545) MikeSmith
11562) Mike Joseph
Also have a fully working unsubscription system now, which is at a much more professional standard.
The remindermail.php script includes an unsubscribe link like this:
http://localhost/unsubscribe/?u=170&s=5a516a0923 (testing on my dev server)
'u' is their vBulletin userid, 's' is an encrypted key based on their password and salt. It won't let them login or do anything except unsubscribe.

Assuming that validates, the page will display this:
http://bbhosts.net/bluesbrothers/unsubscribe1.png
The member can then choose to unsubscribe if they wish. It simply adds their userid and timestamp to another database table, and when the unsubscribe CRON script runs it will delete the account if the timestamp is over 24 hours ago.

If they click "Delete Account", they will then see this:
http://bbhosts.net/bluesbrothers/unsubscribe2.png
If they have never made a post then the account is deleted automatically, but if they have made 1 or more posts on the forum I'd much rather do it manually myself through the AdminCP, to make sure their posts are marked as "Guest" etc. In those cases I'm working on a method to have the request emailed to me after 24 hours have passed, and to also move their account to a new usergroup.

If the UserID and encrypted Key in the URL don't match exactly, they will receive a login screen:
http://bbhosts.net/bluesbrothers/unsubscribe3.png
Although this won't actually log them in to the site, it just validates the Username and Password before redirecting back to /unsubscribe/u=$userid&s=$key

bryanb 06-20-2007 01:18 PM

Wow, thanks man. I've uploaded your php file to see what happens :)


All times are GMT. The time now is 10:27 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02304 seconds
  • Memory Usage 1,786KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_code_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (4)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete