Click to See Complete Forum and Search --> : How to Send reminder?


chaudhari
08-26-2005, 01:42 AM
HI All,
How to send Reminder(Email) after Regular Days interval in asp?
Actually my Probs is Like:-
---------------------
I have a lots of clients who can add products as a Wishlist.
Now i try to send Email automatic as a reminder after one week from adding Product in wishlist.
How can Possible?
Please help me.
Thanx in advanse,
Regards, Chaudhari.

russell
08-27-2005, 08:00 PM
You need to write a program to read the database each day, looking to see who added to their wishlist 7 days ago, then send an email.

ASP isn't the tool for the job if you want it automated. If you're comfortable with ASP then get a look at VB6 or DotNet

Bullschmidt
08-31-2005, 08:29 AM
You need to write a program to read the database each day, looking to see who added to their wishlist 7 days ago, then send an email.


And just after that have a yes/no field called something like IsReminderSent set to yes (to help make sure that the person doesn't keep getting a reminder).

And all this could be in a page that gets included in a main page on your site so that you're pretty sure at least one person will go to that page in a particular day and trigger the reminder e-mail(s).

Here is a snippet of code I've used to create a string of e-mail addresses possibly to be used as the BCC (blind carbon copy) of an e-mail:

' *** Build strUserEmails - E-mail addresses separated by comma and space.
' Set sql.
strSQL = "SELECT UserEmail "
strSQL = strSQL & "FROM tblUser "
strSQL = strSQL & "WHERE (1=1) "
strSQL = strSQL & " AND (UserEmail Is Not Null) "
strSQL = strSQL & " AND (UserIsEmailNotif=True) "
strSQL = strSQL & "ORDER BY UserLName, UserFName "

' Open rs.
Set objRS = Server.CreateObject("ADODB.Recordset")
objRS.Open strSQL, objConn

' If no recs.
If objRS.EOF Then
' Close rs.
objRS.Close
Set objRS = Nothing

Exit Function
Else
' Put recs into array for speed.
arrayRS = objRS.GetRows

' Close rs.
objRS.Close
Set objRS = Nothing

' Init.
strUserEmails = ""

' Loop thru rows (i.e. recs).
For I = 0 To UBound(arrayRS, 2)
' Set var using each fld's col num.
UserEmail = arrayRS(0, I)
strUserEmails = strUserEmails & ", " & UserEmail
Next

' Remove initial comma and space.
strUserEmails = Right(strUserEmails, Len(strUserEmails) - 2)
End If