John and Sai, thank you!
John, I have come up with something similar to your status explanation.
I have also come up with a code that will send an email when deadline is missed.
I am, however, having problem with it.
Can anyone of you take a look, please?
here is the entire code:
I have been working on this now for two days and can seem to take my thought process any higher than it is right now.
I need your help!
I am trying to implement a task program whereby if you are given a certain task with a timeline to complete the task, if the deadline is not met, an email is to be sent to you as a reminder that your task is past the deadline.
Right now, I am not getting any errors but it is not doing anything.
Please take a look and see if you can help!
<%@ language=vbscript %>
<!-- #include file="adovbs.inc" -->
' Define variables
Dim objConn, objRS
' Make sure the date format cannot be confused
dtmCutoffDate = DateAdd("d",+1,Date)
strCutoffDate = Day(dtmCutoffDate) & " " & MonthName(Month(dtmCutoffDate)) & _
" " & Year(dtmCutoffDate)
' Create and setup connection object
Set objConn = CreateObject("ADODB.Connection")
' Retrieve tasks that are to be printed for missing due date
Set objRS = CreateObject("ADODB.RecordSet")
objRS.Open "SELECT * FROM tblNewsItems WHERE dueDate < '" & _
strCutoffDate & "';", objConn, adOpenKeyset, adLockOptimistic, adCmdText
if (cStr(Request("dueDate")) > enddate) Then
set MailObj = Server.CreateObject("CDONTS.NewMail")
MailObj.From = Request.Form("name")
MailObj.To = "firstname.lastname@example.org"
MailObj.Subject = "Your Task Is Past The Due Date"
MailObj.Body = "Email was sent by: " & Request.Form("name") & vbcrlf & vbcrlf&
"email@example.com:" & vbcrlf&
set MailObj = nothing
<form name="form1" method="post" action="">
<input type="text" name="name">
<input type="text" name="email">
<input type="submit" name="Submit" value="Submit">