com.sebtools Build 12 Documentation: Simulated Mailing

Simulated Mailing

You can set Mailer.cfc to not send email by using "Sim" mode.

Setting "Sim" mode with file name

You can set Mailer.cfc to use "Sim" by creating the Mailer component from a Mailer_Sim.cfc file.

Application.Mailer = CreateObject("component","Mailer_Sim").init(MailServer="",,DataMgr=Application.DataMgr)

Setting "Sim" mode with "init" argument

You can also simply set the "mode" argument of the "init" method to "Sim" to use "Sim" mode.

getMode() / setMode()

You can also set the "mode" at any time using the "setMode" method or find out what mode Mailer.cfc is in by using the "getMode" method.

Effects of "Sim" mode

Sim mode will not send out any email messages, but can still log them.

After that, all code remains the same. The advantage of this is that you can switch from testing email to actually sending it without changing any code outside of the component instantiation code.