Skip to content
Tom King edited this page Jun 9, 2018 · 1 revision

Before you can send emails in the system (password resets mainly) you'll need to add an smtp server. You can either add this directly in code, or via the cfml engines admin section. There's loads of infomation on the CFWheels Docs.

Local development SMTP servers

For testing, it can be very handy to have a local SMTP server which captures all mail on port 25. PaperCut is a good choice for Windows users. Various other options exist of course.

Email Templates

You can find the Example App's email templates in /views/emails/. There's a generic _header.cfm and _footer.cfm which are included on all HTML emails. Plain text versions are suffixed with Plain e.g, passwordResetPlain.cfm.

Application settings

There's also an application setting to turn off sending of emails - this won't turn off error emails, but each sendEmail() call is wrapped in a check for this setting. This can be useful for load testing, or penetration testing which can send a lot of email. You can also set the default "from" address in the settings.

To completely disable email (including errors) you would need to add some configuration settings in config/settings.cfm- set(sendEmailOnError=false)

Clone this wiki locally