There's a few things to this.
1) To create a one-time email notification is a ticket is due, I have this code
<cfif isdefined("session.status"
)>
<cfset datenow = "#dateformat(now(),"mm-dd-
yyyy")#">
<cfquery datasource="HelpDesk" name = "reminder">
select a.entry_date, a.entry_description, a.emailto, a.remind, b.email
from Help_Desk_List a, TechsTbl b
where ((a.duedate = #datenow#)
and (a.status = 'Open') and
(a.name = b.name) and
(a.remind = 'Yes'))
</cfquery>
<cfoutput query = "reminder">
<cfmail to="#reminder.email#" from="Helpdesk@FirstbankAK
.COM" subject="REMINDER: Ticket ###Entry_ID# Due TODAY"
server="10.1.100.202">Don'
t forget, this issue needs to be closed today. Goodluck.
Date Opened: #reminder.entry_date#
Requested By: #reminder.emailto#
Description: "#reminder.Entry_Descripti
on#"
</cfmail>
</cfoutput>
</cfif>
But nothing happens when I load the page, or when I click different options to set the session.status.
2) If I include a <cfelseif session.status = "none"><script language = "vbscript">msgbox "session status none"</vbscript>
I get nothing. I orginally started with using <cfif session.status = "none"> but now I'm not sure what is going wrong. I want it to test on form load. From the code it seems also like a table should display on load, but it doesn't unless a session status is determined (the site is in frames).
3)Finally I'd like to update each record that has an email sent to remind is "No"
4)Access holds my duedates as ex. 8/08/2005, but an output #dateformat(now(),"mm/dd/y
yyy")# will be as 08/08/2005 with the leading 0. Is that affecting anything?
Start Free Trial