 
 
 
-
 		<cfquery name="usAgents" dbtype="query">
 			select
-				collection_contact_name agent_name,
-				collection_contact_email address,
+				TRANS_AGENT_NAME agent_name,
+				TRANS_AGENT_EMAIL address,
 				trans_agent_role
 			from
 				expLoan
 			where
 				transaction_id=#transaction_id# and
-				collection_contact_email is not null and
+				TRANS_AGENT_EMAIL is not null and
 				trans_agent_role in ('in-house contact','authorized by','notification contact')
-			group by
-				collection_contact_name,
-				collection_contact_email,
-				trans_agent_role
-		</cfquery>
-
-		<cfquery name="toAgents" dbtype="query">
+			union all
+			select
+				COLLECTION_CONTACT_NAME agent_name,
+				COLLECTION_CONTACT_EMAIL address,
+				'collection contact agent' trans_agent_role
+			from
+				expLoan
+		</cfquery>
+
+		<cfdump var=#usAgents#>
+
+
+
+
+
+		<cfquery name="recipientAgents" dbtype="query">
 			select
 				collection_contact_name agent_name,
 				collection_contact_email address,

				trans_agent_role
		</cfquery>

		<cfif isdefined("Application.version") and  Application.version is "prod">
			<cfset subj="Arctos Loan Notification">
			<cfset maddr=valuelist(usAgents.address)>

			<p>Specimen data for this loan, unless restricted, may be accessed at
				<a href="#application.serverRootUrl#/SpecimenResults.cfm?collection_id=#loan.collection_id#&loan_number=#loan.loan_number#">
					#application.serverRootUrl#/SpecimenResults.cfm?collection_id=#loan.collection_id#&loan_number=#loan.loan_number#
				</a>
			</p>
			<p>
				You may edit the loan, after signing in to Arctos, at
				<a href="#application.serverRootUrl#/Loan.cfm?Action=editLoan&transaction_id=#loan.transaction_id#">
					#application.serverRootUrl#/Loan.cfm?Action=editLoan&transaction_id=#loan.transaction_id#
				</a>
			</p>
			<p>
