Hi, Im running a website where people register and post classified ads. Im already able to send out registration emails when a person registers using Persits.MailSender. Users can then add classified ads to the site. What I want to do is send an automatic email 7 days after the person creates the advert. Any ideas? Thanks for the help
You can sign up with an email auto repsonder site that allows you to schedule timelines for email to be published. http://www.getresponse.com/
I would create a ASP page which looks through your database, and if it finds a record 7 days old, it sends an email to it. Next just setup an AT shedule job on the server which calls that ASP page every night. This way every night the script will run, and email any accounts which are 7 days old.
Thanks itcn, This is what im thinking, I can set up the ASP page ok, its the AT Schedule Job you mention, I've never done this before, is it handy enough to do? Im using a mySQL DB.
It's not hard, but depends on which version of Windows Server you're running. I forget where it was in Windows 2003, but I'm running Windows 2008 and all you have to do is click on Start > Administrative Tools > Task Scheduler. The just click Create Basic Task. For the action just input: "C:\Program Files\Internet Explorer\iexplore.exe" http://nameofsite/yourpage.asp This will open IE and run your ASP page. Just schedule it to run every night.
I use a mail list manager for a couple of sites; do you want the solution to send an unattended email? If so, there are several options. Are you using MS SQL Server on the backend, if so have you tried the SQL Mail function? The mail can be automated via scheduled tasks. Also, instead of shelling out to IE and navigating to an ASP page, the mail component can be wrapped and called from a batch service manager class (can be as simple as a run method on the wrapper class).
Depending on your hosting type (shared, VPS, dedicated) and control panel sometimes you don't have access to scheduled tasks. When I've encountered this I've either: a) got a cheap UNIX hosting account with 'cron'/cPanel and called the asp page once a day, or b) on my home page I include code that checks to see whether my daily email code has run in the last 24 hours - if not I run the code. I prefer option A but as long as you pretty good traffic option B does do the trick.
I got this working, Via a windows scheduled task. I first of all wrote a simple VB script that looped through the database. The ST then runs this script daily. Thanks for the help