> how does that code get triggered
when Coldfusion sees a CFINCLUDE, it stops processing the current file and processes the included file before proceeding.
You can take this...
<cfif isDefined("FORM.AAsubscribe")>
<cftry>
<cfset form.email = trim(form.email)>
<cfif len(form.email) eq 0 or form.email is "Your Email">
<cfthrow message="Please enter your email address">
<cfelseif listLen(form.email,"@") neq 2 or listLen(listLast(form.email,"@"),".") eq 0>
<cfthrow message="Invalid Email address">
</cfif>
<CFQUERY NAME="GetEmail" dataSource = "#application.datasource#">
SELECT Email
FROM SubscriberTestEmailGroup
WHERE email = <CFQUERYPARAM VALUE="#FORM.EMAIL#" CFSQLTYPE="CF_SQL_VARCHAR">
</CFQUERY>
<cfif GetEmail.recordcount gte 1>
<cfthrow message="That email is already registered to receive the newsletter">
</cfif>
<cfquery dataSource = "#application.datasource#">
insert into SubscriberTestEmailGroup (email)
values ('#form.email#')
</cfquery>
<cfcatch>
<cfset strError = cfcatch.message>
</cfcatch>
</cftry>
</cfif>
and turn it into this....
<cfif isDefined("FORM.AAsubscribe")>
<cftry>
<cfinclude template="SendEmail.cfm">
<cfcatch>
<cfset strError = cfcatch.message>
</cfcatch>
</cftry>
</cfif>