 | |  |
 |

Benjamin
Staff

Apr 3, 2003, 7:14 PM
Post #1 of 1
(1047 views)
Shortcut
|
Email notification on Expired Accounts
|
Can't Post
|
|
Hi everyone, Here's a little hack for those of you with version 2.29 of Realty / Auto Manager. It actually works with 2.28 and previous, but I thought I'd just write it straight for 2.29 - any modifications you make to pre-2.29 interface templates will be overwritten shortly once you upgrade to 2.29. As most of you know, there's no built-in email notification upon the expiration of Realty / Auto Manager accounts. While we're certainly interested in implementing something one day, for the moment there's nothing for it. Well, this is a little workaround I pieced together - which does allow for email notification. Here's how it works: In the _rm_login.html template file (stored in your /templates/interface/ directory for you 2.29 users), there's a specific cell for expired accounts. This is used to print an "Account Expired" message to the screen. What I've done is added a little code to it to automatically redirect to a PHP script, sending the client's username with it. This PHP script then makes use of the SMTP server, and sends an email to you saying "Hey. This guys account just expired". Pretty straightforward. Drawbacks: 1. Requires PHP. You can put this file anywhere you want, so hopefully you can find one with PHP which you can get access to. I'll try and rustle up a Perl version, but it'll take some time. My Perl isn't that great just yet. 2. Requires the use of the SMTP server - most servers seem to have email handling, but it's not guaranteed. 3. It will ONLY send the email once the user tries to log in past the expiration date of their account. So don't rely on it! If you don't get an email, don't assume that their account isn't expired. Like I said, it's very much a hack solution. But even half-measures are often better than none! I figure this might be useful for you guys running FSBO sites. I've attached the two files to this post. You have to touch up a couple of spots for your situation: - Edit the expired.php file to fit your site - this will be the file that users will see upon the expiration of their account; perhaps spice it up and provide links to how to RENEW accounts, etc. etc. Also, in the mail() function, replace the admin@yoursite.com to point to YOUR email address. This is where the emails are going to be sent! - Edit the _rm_login.html file to point to the location of the expired.php script. This is found right at the bottom of the file. Enjoy! :-) Post me back with any bugs / improvements / comments / whatever! Ben interactivetools.com
(This post was edited by Benjamin on Apr 3, 2003, 7:19 PM)
|
|
Attachments:
|
_rm_login.html
(10.3 KB)
|
|
|
expired.php
(0.51 KB)
|
|
|  |
 | |  |
|