Hi all,
Am working on a script ( see below ) that is suppose to look up a date field in a database and notify me when the date has expired or expiring. Everytime I run the script, I get the following error msg. Some body help me out here!:
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'to'
/realsql/TMPc42ocpzvof.asp, line 36
Line 36 contains the following code: "objEmail.to = Email"
(This is the rest of the code)
<%@ language="vbscript" %>
<% option explicit %>
<!-- #include file="utilitis.asp" -->
<%
dim strSQL
strSQL = "SELECT * FROM content WHERE expire<='" & date() & "'" ' ----
dim objup
set objup = server.createobject("ADODB.RecordSet"
rs.open strSQL, cn, 1, 3
dim objEmail
dim count
dim people
dim email
count =0
dim message
email = rs("Email"
do while not rs.EOF
message = "the following document is due to be reviewed -- " & rs("title" & "-- This reminder was brought to you by
Set objEmail = Server.CreateObject("CDONTS.NewMail"
objEmail.to = Email
objEmail.bcc = "jasper@mail.co.uk"
objEmail.From = "Cliniweb<--->"
objEmail.subject = "You have a reminder! " & date()
objEmail.body = message
objEmail.send
set objEmail = nothing
people = people & "<br> " & rs("author"
count = count + 1
rs.movenext
loop
response.write("<b>" & count & "</b> reminders were sent on "& date() & " to:<br> "
response.write(people)
set cn=nothing
%>
Am working on a script ( see below ) that is suppose to look up a date field in a database and notify me when the date has expired or expiring. Everytime I run the script, I get the following error msg. Some body help me out here!:
Error Type:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'to'
/realsql/TMPc42ocpzvof.asp, line 36
Line 36 contains the following code: "objEmail.to = Email"
(This is the rest of the code)
<%@ language="vbscript" %>
<% option explicit %>
<!-- #include file="utilitis.asp" -->
<%
dim strSQL
strSQL = "SELECT * FROM content WHERE expire<='" & date() & "'" ' ----
dim objup
set objup = server.createobject("ADODB.RecordSet"
rs.open strSQL, cn, 1, 3
dim objEmail
dim count
dim people
dim email
count =0
dim message
email = rs("Email"
do while not rs.EOF
message = "the following document is due to be reviewed -- " & rs("title" & "-- This reminder was brought to you by
Set objEmail = Server.CreateObject("CDONTS.NewMail"
objEmail.to = Email
objEmail.bcc = "jasper@mail.co.uk"
objEmail.From = "Cliniweb<--->"
objEmail.subject = "You have a reminder! " & date()
objEmail.body = message
objEmail.send
set objEmail = nothing
people = people & "<br> " & rs("author"
count = count + 1
rs.movenext
loop
response.write("<b>" & count & "</b> reminders were sent on "& date() & " to:<br> "
response.write(people)
set cn=nothing
%>