<beans default-lazy-init="false"
	xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xmlns:util="http://www.springframework.org/schema/util" xmlns:jee="http://www.springframework.org/schema/jee"
	xsi:schemaLocation="
		http://www.springframework.org/schema/beans 
		http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
	    http://www.springframework.org/schema/util 
	    http://www.springframework.org/schema/util/spring-util-3.0.xsd
    	http://www.springframework.org/schema/jee 
    	http://www.springframework.org/schema/jee/spring-jee-3.0.xsd">

	<bean id="welcomeMailMessage" class="org.springframework.mail.SimpleMailMessage">
		<property name="from" value="donotReply@ihta" />
		<property name="subject" value="Welcome to IHTA" />
		<property name="to" value="PII            " />
		<property name="text">
			<value>
		<![CDATA[<html>
			<head>
			<style>
			.email_body{ background-color:#FFFFFF; color:#000000; font-weight:normal; padding:5px; horizontal-align:left;}
			.signature{  background-color:#FFFFFF; color:#000000; font-weight:bold;   padding:5px; horizontal-align:left;}
			</style>
			</head>
			<div class="email_body">
			$!user.firstName $!user.lastName,<br/><br/>
			Your registration for the Integrated Home Telehealth Application (IHTA) has been approved.<br/><br/>
			Use the link <a href="$webAppUrl/home.html">Integrated Home Telehealth Application</a> to log in to IHTA.<br><br/>
			Please do not reply to this email.<br/><br/>
			</div>
			<div class="signature">IHTA Team</div>
			</html>]]>
			</value>
		</property>
	</bean>

	<bean id="adminMailMessage" class="org.springframework.mail.SimpleMailMessage">
		<property name="from" value="donotReply@ihta" />
		<property name="subject" value="Pending User Registration for Approval" />
		<property name="to" value="PII             " />
		<property name="text">
			<value>
		<![CDATA[<html>
			<head>
			<style>
			.email_body{ background-color:#FFFFFF; color:#000000; font-weight:normal; padding:5px; horizontal-align:left;}
			.signature{  background-color:#FFFFFF; color:#000000; font-weight:bold;   padding:5px; horizontal-align:left;}
			</style>
			</head>
			<div class="email_body">
			$!user.firstName $!user.lastName has registered for access to the Integrated Home Telehealth Application (IHTA).<br/><br/>
			As the assigned Administrator of the <a href="$webAppUrl/home.html">Integrated Home Telehealth Application</a> please log in to approve/disapprove this registration.<br><br/>
			Please do not reply to this email.<br/><br/>
			</div>
			<div class="signature">IHTA Team</div>
			</html>]]>
			</value>
		</property>
	</bean>

	<bean id="confirmMailMessage" class="org.springframework.mail.SimpleMailMessage">
		<property name="from" value="donotReply@ihta" />
		<property name="subject"
			value="IHTA Registration Confirmation" />
		<property name="to" value="PII            " />
		<property name="text">
			<value>
		<![CDATA[<html>
			<head>
			<style>
			.email_body{ background-color:#FFFFFF; color:#000000; font-weight:normal; padding:5px; horizontal-align:left;}
			.signature{  background-color:#FFFFFF; color:#000000; font-weight:bold;   padding:5px; horizontal-align:left;}
			</style>
			</head>			
			<div class="email_body">
			$!user.firstName $!user.lastName,<br/><br/>
			Thank you for registering to obtain access to the Integrated Home Telehealth Application (IHTA).<br/><br/>
			<b>User Name:</b> $!user.username<br>
			<b>First Name:</b> $!user.firstName<br>
			<b>Last Name:</b> $!user.lastName<br>
			<b>Phone Number:</b> $!user.telephoneNumber<br><br>
			Your registration is pending approval.<br><br>
			You will receive a subsequent e-mail informing you whether your registration request was approved or disapproved.<br><br>
			Please do not reply to this email.<br/><br/>
			</div>
			<div class="signature">IHTA Team</div>
			</html>]]>
			</value>
		</property>
	</bean>

	<bean id="deniedMailMessage" class="org.springframework.mail.SimpleMailMessage">
		<property name="from" value="donotReply@ihta" />
		<property name="subject" value="IHTA Registration" />
		<property name="to" value="PII            " />
		<property name="text">
			<value>
		<![CDATA[<html>
			<head>
			<style>
			.email_body{ background-color:#FFFFFF; color:#000000; font-weight:normal; padding:5px; horizontal-align:left;}
			.signature{  background-color:#FFFFFF; color:#000000; font-weight:bold;   padding:5px; horizontal-align:left;}
			</style>
			</head>			
			<div class="email_body">
			$!user.firstName $!user.lastName,<br/><br/>
			Your registration request to access Integrated Home Telehealth Application (IHTA) has been denied.<br/><br/>
			<b>Reason for denial:</b> $!user.registrationDeniedReason.name<br><br>
			Please contact the <a href="PII                              ?subject=IHTA Registration denied&body=User Name: $!user.username">IHTA administrator</a> if you have any questions.<br><br>
			Please do not reply to this email.<br/><br/>
			</div>
			<div class="signature">IHTA Team</div>
			</html>]]>
			</value>
		</property>
	</bean>

	<bean id="weeklyVCReportMessage" class="org.springframework.mail.SimpleMailMessage">
		<property name="from" value="donotReply@ihta" />
		<property name="subject" value="Device Model and Serial Number Vendor Compliance Report for $reportEndDate" />
		<property name="to" value="${weeklyVCReportEMail}" />
		<property name="text">
			<value>
		<![CDATA[<html>
			<head>
			<style>
			table{empty-cells: show;  border-collapse: collapse; border:1px;}
			caption { caption-side: top; color:#000000; font-weight:bold;}			
			td{border:1px solid black; padding-left: 1em; padding-right: 1em;}
			th{border:1px solid black; padding-left: 1em; padding-right: 1em;}
			.email_body{ background-color:#FFFFFF; color:#000000; font-weight:normal; padding:5px; horizontal-align:left;}
			.subheading{ background-color:#FFFFFF; color:#000000; font-weight:bold;   padding:5px; horizontal-align:left;}
			.signature{  background-color:#FFFFFF; color:#000000; font-weight:bold;   padding:5px; horizontal-align:left;} 
			</style>
			</head>			
			<div class="email_body">			
			The Device Model and Serial Number Vendor Compliance Report for the reporting period of $reportStartDate through $reportEndDate is displayed below.
			The Vendor Compliance chart for the week ending $reportEndDate is attached to this e-mail.
			<br><br>
			Log in to the <a href="$webAppUrl/home.html">Integrated Home Telehealth Application</a> to view the associated Vendor Compliance reports and graphs. If there are any problems accessing IHTA, please contact <a href="PII                              ?subject=IHTA Feedback/Issues" target="_blank">IHTA Support</a>.
			<br><br>Please do not reply to this e-mail.<br/><br/>
		    </div>
			<div class="signature">IHTA Team</div>
			<br><br><br><br>			
			<div>
				<table>
					<caption>Device Model & Serial Number reports<br>Reporting Period:  $reportStartDate through $reportEndDate</caption>
					$!dataTable
				</table>
			</div>
			</html>]]>
			</value>
		</property>
	</bean>

	<bean id="reportNotificationMailMessage" class="org.springframework.mail.SimpleMailMessage">
		<property name="from" value="donotReply@ihta" />
		<property name="subject"
			value="IHTA Notification of Report Available for Viewing - $report.code - $report.name." />
		<property name="to" value="PII            " />
		<property name="text">
			<value>
		<![CDATA[<html>
			<head>
			<style>
			.email_body{ background-color:#FFFFFF; color:#000000; font-weight:normal; padding:5px; horizontal-align:left;}
			.signature{  background-color:#FFFFFF; color:#000000; font-weight:bold;   padding:5px; horizontal-align:left;}
			</style>
			</head>			
			<div class="email_body">			
				The following report is available for your viewing:<br/><br/>	
				Report Type: $!report.reportType.name<br/>	
				Report ID: $!report.code<br/>	
				Report Title: $!report.name<br/>	
				Date Run: $!runDate<br/>	
				<br/><br/>	
				Log in to the <a href="$webAppUrl/home.html">Integrated Home Telehealth Application</a> and navigate 
				to the Completed Reports list to view the report.  If there are any problems accessing IHTA, please 
				contact <a href="PII                              ?subject=IHTA Feedback/Issues" target="_blank">IHTA Support</a>.
				<br><br>
				Please do not reply to this e-mail.
				<br/><br/>
			</div>
			<div class="signature">IHTA Team</div>
			</html>]]>
			</value>
		</property>
	</bean>
	
	<bean id="qirNotificationMailMessage" class="org.springframework.mail.SimpleMailMessage">
		<property name="from" value="donotReply@ihta" />
		<!-- 
					Subject: QIR 0001, New, Henry Ford, Facility # Detroit VMAC
		 -->
		<property name="subject"
			value="QIR $qir.id, $qir.qirStatusType.name, $qir.emailSubmittedByName, Facility $qir.facility.stationNumber $qir.facility.name" />
		<property name="to" value="PII            " />
		<property name="text">
			<value>
		<![CDATA[<html>
			<head>
			<style>
			.email_body{ background-color:#FFFFFF; color:#000000; font-weight:normal; padding:5px; horizontal-align:left;}
			.signature{  background-color:#FFFFFF; color:#000000; font-weight:bold;   padding:5px; horizontal-align:left;}
			</style>
			</head>
			<div class="email_body">	
				<b>QIR:</b> $qir.id<br/>
				<b>Status:</b>	$!qir.qirStatusType.name<br/>				
				<b>Updated by:</b>	$!qir.modifiedByName<br/>
				<br/>	
				An update has been made to Quality Improvement Report (QIR) $qir.id. Please review and take appropriate action as necessary.
				<br/><br/>
				Log in to the <a href="$webAppUrl/home.html">Integrated Home Telehealth Application (IHTA)</a> to view the QIR.  
				If there are any problems accessing IHTA, please contact <a href="PII                              ?subject=IHTA Feedback(QIR)/Issues" target="_blank">IHTA Support</a>.
				<br><br>
				Please do not reply to this e-mail.
				<br/><br/>
			</div>
			<div class="signature">IHTA Team</div>
			</html>]]>
			</value>
		</property>
	</bean>
	
	<bean id="qirVendorResponseDueMailMessage" class="org.springframework.mail.SimpleMailMessage">
		<property name="from" value="donotReply@ihta" />
		<property name="subject"
			value="QIR $qir.id Overdue $qir.qirStatusType.name $!qir.submittedByName $!qir.facility.description" />
		<property name="to" value="PII            " />
		<property name="text">
			<value>
		<![CDATA[<html>
			<head>
			<style>
			.email_body{ background-color:#FFFFFF; color:#000000; font-weight:normal; padding:5px; horizontal-align:left;}
			.signature{  background-color:#FFFFFF; color:#000000; font-weight:bold;   padding:5px; horizontal-align:left;}
			.warning{  background-color:#FFFFFF; color:#FF0000; font-weight:bold;   padding:5px; horizontal-align:left;}
			</style>
			</head>			
			<div class="email_body">	
				<b>QIR:</b> $qir.id<br/>
				<b>Status:</b>	$!qir.qirStatusType.name<br/>								
				<br/>	
				<div class="warning">Vendor Response is overdue.</div>
				<br/><br/>
				Log in to the <a href="$webAppUrl/home.html">Integrated Home Telehealth Application (IHTA)</a> to view the QIR.  
				If there are any problems accessing IHTA, please contact <a href="PII                              ?subject=IHTA Feedback(QIR)/Issues" target="_blank">IHTA Support</a>.
				<br><br>
				Please do not reply to this e-mail.
				<br/><br/>
			</div>
			<div class="signature">IHTA Team</div>
			</html>]]>
			</value>
		</property>
	</bean>	
	
	<bean id="dmpDeployToVendorMailMessage" class="org.springframework.mail.SimpleMailMessage">
		<property name="from" value="donotReply@ihta" />
		<property name="subject"
			value="DMP Review" />
		<property name="text">
			<value>
		<![CDATA[<html>
			<head>
			<style>
			.email_body{ background-color:#FFFFFF; color:#000000; font-weight:normal; padding:5px; horizontal-align:left;}
			.signature{  background-color:#FFFFFF; color:#000000; font-weight:bold;   padding:5px; horizontal-align:left;}
			.warning{  background-color:#FFFFFF; color:#FF0000; font-weight:bold;   padding:5px; horizontal-align:left;}
			</style>
			</head>			
			<div class="email_body">	
				<div class="warning">DMP review requested.</div>
				<br/><br/>
				<b>DMP:</b> $dmp.name<br/>
				<b>Status:</b> $dmp.dmpStatusType.name<br/>								
				<br/>	
				You are requested to review and comment on the attached DMP.  
				Please review and return comments to $dmp.emailSubmittedByName within the next 20 business days.  Thank you for your participation in the DMP development process.
				<br><br>
				Please do not reply to this e-mail.
				<br/><br/>
			</div>
			<div class="signature">IHTA Team</div>
			</html>]]>
			</value>
		</property>
	</bean>	
	
	<bean id="JobExecutedMessage" class="org.springframework.mail.SimpleMailMessage">
		<property name="from" value="donotReply@ihta" />
		<property name="subject" value="IHTA Job Executed: $name" />
		<property name="to" value="PII            " />
		<property name="text">
			<value>
			<![CDATA[<html>
			<head>
			<style>
			.email_body{ background-color:#FFFFFF; color:#000000; font-weight:normal; padding:5px; horizontal-align:left;}
			.signature{  background-color:#FFFFFF; color:#000000; font-weight:bold;   padding:5px; horizontal-align:left;}
			.warning{  background-color:#FFFFFF; color:#FF0000; font-weight:bold;   padding:5px; horizontal-align:left;}
			</style>
			</head>			
			<div class="email_body">	
				<br/>
				<b>Process Statistics:</b> <br/>	
				$statistics							
				<br/> <br/>	
				Please do not reply to this e-mail.
				<br/><br/>
			</div>
			</html>]]>
			</value>
		</property>
	</bean>
	
	<bean id="velocityTemplateEngine"
		class="org.springframework.ui.velocity.VelocityEngineFactoryBean">
		<property name="velocityPropertiesMap">
			<map>
				<entry key="resource.loader">
					<value>ds</value>
				</entry>
				<entry key="ds.resource.loader.class">
					<value>gov.va.med.ccht.service.common.TemplateLoaderService</value>
				</entry>
				<entry key="ds.resource.loader.instance">
					<ref bean="templateLoader" />
				</entry>
			</map>
		</property>
	</bean>

	<!--Velocity Database Template Loader-->
	<bean id="templateLoader" class="gov.va.med.ccht.service.common.TemplateLoaderService">
	</bean>
</beans>