View Full Version : Disabling email for older accounts
VodkaFish
01-21-2015, 02:11 PM
Is there any easy way (outside of a sql statement, which is what I assume I'm going to need here) to disable old accounts from receiving emails? Most people who receive the birthday email seem to like it, but those who haven't logged in in years, the chances of a bounce are high, and I'd like to avoid those.
I'm thinking I can write a sql statement setting receive admin emails to no on activity date before 'x', but before I did, I wanted to know if there was some control panel way to do it.
I can't think of any way to do that without a query.
VodkaFish
01-21-2015, 04:51 PM
Thanks. Should I be looking at the allowemail column? Searching in the forums makes it look like it's in the options column as WHERE options & 16 instead of WHERE allowemail = 'yes'
nerbert
01-21-2015, 04:54 PM
If it's mostly birthday emails you're concerned with and you don't mind a file edit it looks like you could modify includes/cron/birthday.php so the query there picks up lastactivity and a conditional determines whether to send the email based on the time elapsed
Thanks. Should I be looking at the allowemail column? Searching in the forums makes it look like it's in the options column as WHERE options & 16 instead of WHERE allowemail = 'yes'
Yeah, it's the options & 16 one. It should be something like
UPDATE user SET options = options - 16 WHERE options & 16 AND ....
where you'd add your date check code. It checks for options & 16 because it does a subtraction to unset the bit, so of course you dont' want to do it unless it's already set. I took that from the "canned" queries in the Maintenance menu, and I don't know enough SQL to know why they don't use a bitmask.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.