2/2/2015 - 6:36 PM

Create a list of SA Emails

Create a list of SA Emails

<!--- Query to get System Administrators [70]--->
<cfquery name="GetSysadmin"datasource="#application.datasrc_mss#" dbtype="#application.dbtype_mss#" >
  Select email
  From employee_profile
  Where Security_level = 70 
   AND unit_id = '#session.unit_id#'
   AND (MSS_UNIT_TERM_DT is null 
        OR MSS_UNIT_TERM_DT >= to_date('#DateFormat(NOW(),"mm-dd-yy")# 00:00:00','mm-dd-yy hh24:mi:ss'))

<!--- Put all SAs into a valuelist --->
<cfset SAemail = ValueList(GetSysadmin.EMAIL,";")>

<!--- Send out an email to the SAs--->
  <cfmail to="#SAemail#"
          subject="Admin Alert">
Here is where the message would go.

Thank you, 
Med Schedule System 
Automated Notification System 
Please do not respond to this email.