ColdFusion Server 9 on Windows Server 2008 6.1
ColdBox 2.6.3
I have a simple event handler with a cfmail tag that emails a simple
test email.
<cffunction name="testhandler" access="public" returntype="void"
output="false">
<cfargument name="Event" type="coldbox.system.beans.requestContext">
<!--- Logic --->
<cfscript>
var rc = event.getCollection();
</cfscript>
<cfmail SERVER="mail.xxxxxx.com"
USERNAME="xxxx"
PASSWORD="xxxx"
subject="testing"
from="no reply<noreply@xxxx.com"
to="clint<webmaster@xxxx.com>"
failto="clint<webmaster@xxxx.com>"
replyto="clint<webmaster@xxxx.com>"
type="text/html">
#now()#
</cfmail>
<!--- Display --->
<cfset Event.setValue('pageTitle',"Test")>
<cfset Event.setValue('section',"default")>
<cfset Event.setView("test/result")>
</cffunction>
The event handler runs fine but the cfmail runs twice for no reason,
always. In the Coldbox Cache debug this handler shows 2 hits for every
request, isn't it supposed to be 1 hit?
What would possibly make a handler run twice? Here's my config:
<Config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://www.coldboxframework.com/schema/
config_2.6.0.xsd">
<Settings>
<!--These settings are automatically overridden by the
environments.xml.cfm for development. These settings are for
production only, no need to change anything.-->
<Setting name="AppMapping" value="" />
<Setting name="AppName" value="mysticinsight" />
<Setting name="ApplicationStartHandler" value="main.onAppInit" />
<Setting name="CustomErrorTemplate" value="/includes/
generic_error.cfm" />
<Setting name="CustomEmailBugReport" value="" />
<Setting name="ColdboxLogsLocation" value="logs" />
<Setting name="ConfigAutoReload" value="false" />
<Setting name="DebugMode" value="false" />
<Setting name="DebugPassword" value="xxxx" />
<Setting name="DefaultEvent" value="general.index" />
<Setting name="DefaultLogLevel" value="3" />
<Setting name="EventName" value="event" />
<Setting name="ExceptionHandler" value="main.onException" />
<Setting name="EnableBugReports" value="true" />
<Setting name="EnableColdfusionLogging" value="false" />
<Setting name="EnableDumpVar" value="false" />
<Setting name="EnableColdboxLogging" value="true" />
<Setting name="EventCaching" value="true" />
<Setting name="FlashURLPersistScope" value="session" />
<Setting name="HandlersIndexAutoReload" value="false" />
<Setting name="HandlersExternalLocation" value="" />
<Setting name="HandlerCaching" value="true" />
<Setting name="IOCFramework" value="" />
<Setting name="IOCFrameworkReload" value="false" />
<Setting name="IOCDefinitionFile" value="/config/Coldspring.xml" /
<Setting name="IOCObjectCaching" value="true" />
<Setting name="MessageboxStyleOverride" value="false" />
<Setting name="ModelsExternalLocation" value="" />
<Setting name="ModelsObjectCaching" value="true" />
<!-- Uncomment More Model Integration Settings:
<Setting name="ModelsSetterInjection" value="false" />
<Setting name="ModelsDICompleteUDF" value="onDIComplete" />
<Setting name="ModelsStopRecursion" value="" />
<Setting name="ModelsDebugMode" value="true" />
-->
<Setting name="ModelsDebugMode" value="false" />
<Setting name="MyPluginsLocation" value="plugins" />
<Setting name="onInvalidEvent" value="" />
<Setting name="OwnerEmail" value="webmaster@mysticinsight.com" /
<Setting name="ProxyReturnCollection" value="false" />
<Setting name="RequestEndHandler" value="main.onRequestEnd" />
<Setting name="RequestStartHandler" value="main.onRequestStart" />
<Setting name="RequestContextDecorator" value="" />
<Setting name="ReinitPassword" value="xxxx" />
<Setting name="SessionStartHandler" value="main.onSessionStart" />
<Setting name="SessionEndHandler" value="main.onSessionEnd" />
<Setting name="UDFLibraryFile" value="" />
<Setting name="ViewsExternalLocation" value="" />
</Settings>
<!-- Your Settings (can be overritten in the environments.xml.cfm)-->
<YourSettings>
<Setting name="ColdBoxSideBar" value="false" />
<Setting name="businessName" value="Mysticinsight.com" />
<Setting name="development" value="0" />
<Setting name="adminEmail" value="clint317@gmail.com" />
<!-- Directories -->
<Setting name="imageDir" value="/includes/images/" />
<Setting name="advisorPicturesDir" value="/includes/
advisorpictures/" />
<Setting name="advisorThumbsDir" value="/includes/advisorpictures/
thumbs/" />
<Setting name="jsDir" value="/includes/js/" />
<Setting name="cssDir" value="/includes/css/" />
<Setting name="emailTemplatesDir" value="/includes/
emailtemplates/" />
<Setting name="webservicesDir" value="/webservices/" />
</YourSettings>
<DebuggerSettings>
<PersistentRequestProfiler>true</PersistentRequestProfiler>
<maxPersistentRequestProfilers>10</
<maxRCPanelQueryRows>50</maxRCPanelQueryRows>
<TracerPanel show="true" expanded="false" />
<InfoPanel show="true" expanded="false" />
<CachePanel show="true" expanded="false" />
<RCPanel show="true" expanded="false" />
</DebuggerSettings>
<!--Optional,if blank it will use the CFMX administrator settings.-->
<MailServerSettings>
<MailServer>mail.xxxx.com</MailServer>
<MailPort>25</MailPort>
<MailUsername>xxxx</MailUsername>
<MailPassword>xxxx</MailPassword>
</MailServerSettings>
<BugTracerReports>
</BugTracerReports>
<DevEnvironments>
<url>127.0.0.1:8301</url>
<url>localhost:8301</url>
</DevEnvironments>
<WebServices>
</WebServices>
<Layouts>
<DefaultLayout>Layout.Default.cfm</DefaultLayout>
<DefaultView>home</DefaultView>
<Layout name="myaccount" file="Layout.MyAccount.cfm">
<Folder>myaccount</Folder>
</Layout>
<Layout name="empty" file="Layout.Empty.cfm">
<Folder>webmaster</Folder>
</Layout>
</Layouts>
<i18N></i18N>
<Datasources>
<Datasource alias="DSN" name="xxxx" dbtype="mysql" username="xxxx"
password="xxxx" />
</Datasources>
<!--ColdBox Object Caching Settings Overrides the Framework-wide
settings-->
<Cache>
<ObjectDefaultTimeout>20</ObjectDefaultTimeout>
<ObjectDefaultLastAccessTimeout>5</ObjectDefaultLastAccessTimeout>
<UseLastAccessTimeouts>true</UseLastAccessTimeouts>
<ReapFrequency>1</ReapFrequency>
<MaxObjects>0</MaxObjects>
<FreeMemoryPercentageThreshold>0</FreeMemoryPercentageThreshold>
<EvictionPolicy>LFU</EvictionPolicy>
</Cache>
<!-- Interceptor Declarations -->
<Interceptors>
<!-- USE ENVIRONMENT CONTROL -->
<Interceptor class="coldbox.system.interceptors.environmentControl">
<Property name='configFile'>config/environments.xml.cfm</Property>
</Interceptor>
<!-- USE AUTOWIRING -->
<Interceptor class="coldbox.system.interceptors.autowire">
<Property name='enableSetterInjection'>true</Property>
</Interceptor>
<!-- USE SES -->
<Interceptor class="coldbox.system.interceptors.ses">
<Property name="configFile">config/routes.cfm</Property>
</Interceptor>
<Interceptor class="interceptors.visitorInterceptor"></Interceptor>
</Interceptors>
<!-- Custom Conventions -->
<Conventions>
<handlersLocation>events</handlersLocation>
<pluginsLocation>plugins</pluginsLocation>
<layoutsLocation>layouts</layoutsLocation>
<viewsLocation>views</viewsLocation>
<eventAction>index</eventAction>
<modelsLocation>model</modelsLocation>
</Conventions>
</Config>