Automatic Email Reminder
I have this website in ASP/Database driven website. In the database, I have a table with Members and Expiration Dates of their registrations.
I want the website to be able to send an email reminder automatically when that expiration date is reached.
I think I need some kind of Server Side component for this...if so, which one should I be looking at and is this doable?
On your new web server you can setup a daily batch script scheduled to run and query your database of subscribers. Based on date of expiration (or whatever) you can email members.
I do this with several things including birthday emails daily.
Care to offer more detail? I'm also interested in implementing this on a Windows 2003 server where I'm running a website off IIS.
It's extremely simple. Simply create a vbs file:
Go to your window scheduler and schedule that file to run daily, weekly, etc.
mysqlquery (select from members where whatever)
Hoping people are still reading this thread... I tried the below "simpleton" code and it seems to be doing nothing. When I pop this into an ASP page and load it with a browser, it works fine, but not as a .vbs file just opened from a satelllite computer. Do I need to have it be opened on the server itself?
On Error resume Next
CR = Chr(13)
Set MyCDO = Server.CreateObject("CDO.Message")
If IsObject (MyCDO) Then
MyCDO.From = "firstname.lastname@example.org"
MyCDO.To = "email@example.com"
MyCDO.Cc = ""
MyCDO.Bcc = "firstname.lastname@example.org"
MyCDO.MailFormat = 0
MyCDO.BodyFormat = 0
MyCDO.Importance = 2
MyCDO.Subject = "Test of VBS file email"
TBdy = "<html>"
TBdy = TBdy & CR & "<head></head>"
TBdy = TBdy & CR & "<body>"
TBdy = TBdy & CR & "<p>"
TBdy = TBdy & CR & "Test email sent on " & Now()
TBdy = TBdy & CR & "</p>"
TBdy = TBdy & CR & "</body>"
TBdy = TBdy & CR & "</html>"
MyCDO.HTMLBody = TBdy
Set MyCDO = nothing
Set TBdy = nothing
Response.Write("Email was not sent")
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)