View Full Version : Resolved Have You Forgotten Us?
M2com
08-14-2011, 09:31 PM
I've been trying to create a PHP script that sends an email to a user who hasn't visited our site in a while. How can I do this?
Thanks!
do you currently log when users visit?
your flow might look like:
--check db for users with "last_visit" more than {whatever interval you choose} ago
--use mail() (http://www.php.net/manual/en/book.mail.php) to send reminder
you could possibly make this a cron job, so it would run automatically at a set interval.
honestly, though, I would recommend against this.
People who don't visit your website anymore won't be happy to get annoying reminders about it.
for example, I'm getting mighty p*ssed at linkedin right now.
M2com
08-14-2011, 10:15 PM
LOL!
What would be an example of "last_visit" and "more than {whatever interval you choose} ago"? Sorry but I'm a little new in this area of PHP.
Thanks!
well, that's directly related to if you already keep a record of when users visit your site (presumably in a database). Do you currently do this?
Powered by vBulletin® Version 4.2.2 Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.