Usage

Adding this intereceptor to your environments.xml.cfm file within coldbox will force coldbox to override the sending of ALL email sent through its MailService to either the 'EmailDebugTOAddress' attribute, or trace it to the coldbox dashboard.

This is the main setup I use with this interceptor

        <Interceptors>
            <!-- USE ENVIRONMENT CONTROL -->
            <Interceptor class="{location of interceptor}.EnvironmentSafeMailService">
                <Property name='EmailTrace'>true</Property>
                <Property name='EmailSend'>false</Property>
                <Property name='EmailOverrideAddress'>[email protected]</Property>
            </Interceptor>
        </Interceptors>

Attributes for Interceptor

  • EmailTrace
    • Values :
      • TRUE
        • Uses the built in logger to trace it to the dashboard
      • FALSE
        • Ignores the tracing feature
  • EmailSend
    • Values :
      • TRUE
        • Uses the EmailOverrideAddress attribute to send the email to (and removes all other recipients).
      • FALSE
        • Ignores sending the email
  • EmailOverrideAddress
    • Valid Email address to send email too.
Add interceptor xml to environments.xml.cfm file to enable.

        <Interceptors>
            <!-- USE ENVIRONMENT CONTROL -->
            <Interceptor class="{location of interceptor}.EnvironmentSafeMailService">
                <Property name='EmailTrace'>true</Property>
                <Property name='EmailSend'>false</Property>
                <Property name='EmailOverrideAddress'>[email protected]</Property>
            </Interceptor>
        </Interceptors>
Version 1.0.1
  Now accepts 3 properties at configuration to allow simultaneous tracing and sending of the email.

Version 1.0
    First release of code. 

 

 
  •   Craig Benner
  • 1.0.1 is the latest of 1 release(s)
  • Published on Jun 09 2016 04:24 AM
box install ColdBox-Interceptor---Environment-Safe-Mail-Service

Add the following to your dependencies or devdependencies objects in your box.json, so CommandBox can track it as a dependency.

"ColdBox-Interceptor---Environment-Safe-Mail-Service" : "stable"
0.00 / 0
  • Jan 19 2010 11:38 AM
  • Jun 09 2016 04:24 AM
  • 6357
  • 1823
  • 1