J
Janet
I verified that CDONTS and SMTP are supported by the server. I do not
receive an error message when I open the following ASP page nor do I
receive an email. I used response.write to verify that it creates a
recordset. As always, any help is appreciated. Code is as follows:
<!-- #INCLUDE FILE="adovbs.inc" -->
<%
Dim objNewMail ' Our CDO object
Dim strTo ' Strings to hold our email fields
Dim strFrom
Dim strSubject
Dim strBody
Dim objConn
strFrom = "(e-mail address removed)"
strSubject = "!! Alert: Resource Brokering Request Expiration !!"
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionTimeout = 15
objConn.CommandTimeout = 30
Dim strConnString
strConnString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _
Server.MapPath("includes\database.mdb") & ";"
strSQL = "SELECT RECRUITER_EMAIL, JOB_FILE_NBR FROM RB_REQUEST WHERE
EXPIR_DT=#" & Date()+1 & "#"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strSQL, strConnString, adOpenKeyset, adLockPessimistic,
adCmdText
Do While Not RS.EOF
strTo = RS.Fields("RECRUITER_EMAIL")
strJob = RS.Fields("JOB_FILE_NBR")
strBody = "The Resource Brokering Request for Job File Number " &
strJob & vbCrLf _
& " will expire in 24 hours. Please extend the expiration date for
this request if necessary."
Set objNewMail = Server.CreateObject("CDONTS.NewMail")
objNewMail.From = strFrom
objNewMail.To = strTo
objNewMail.Subject = strSubject
objNewMail.Body = strBody
'objCDO.Send
Set objNewMail = Nothing
RS.MoveNext
Loop
%>
receive an error message when I open the following ASP page nor do I
receive an email. I used response.write to verify that it creates a
recordset. As always, any help is appreciated. Code is as follows:
<!-- #INCLUDE FILE="adovbs.inc" -->
<%
Dim objNewMail ' Our CDO object
Dim strTo ' Strings to hold our email fields
Dim strFrom
Dim strSubject
Dim strBody
Dim objConn
strFrom = "(e-mail address removed)"
strSubject = "!! Alert: Resource Brokering Request Expiration !!"
Set objConn = Server.CreateObject("ADODB.Connection")
objConn.ConnectionTimeout = 15
objConn.CommandTimeout = 30
Dim strConnString
strConnString = "Provider=Microsoft.Jet.OLEDB.4.0; Data Source=" & _
Server.MapPath("includes\database.mdb") & ";"
strSQL = "SELECT RECRUITER_EMAIL, JOB_FILE_NBR FROM RB_REQUEST WHERE
EXPIR_DT=#" & Date()+1 & "#"
Set rs = Server.CreateObject("ADODB.Recordset")
rs.Open strSQL, strConnString, adOpenKeyset, adLockPessimistic,
adCmdText
Do While Not RS.EOF
strTo = RS.Fields("RECRUITER_EMAIL")
strJob = RS.Fields("JOB_FILE_NBR")
strBody = "The Resource Brokering Request for Job File Number " &
strJob & vbCrLf _
& " will expire in 24 hours. Please extend the expiration date for
this request if necessary."
Set objNewMail = Server.CreateObject("CDONTS.NewMail")
objNewMail.From = strFrom
objNewMail.To = strTo
objNewMail.Subject = strSubject
objNewMail.Body = strBody
'objCDO.Send
Set objNewMail = Nothing
RS.MoveNext
Loop
%>