While in development mode, it's not necessary to send emails (and can be spammy for the most part). We would like to be able to see the generate email in the log, but perform no email deliveries.
When the site is running in production mode, we would want to send deliveries as usual.
is this possible in a config file somewhere?
you could do something as simple as:
and this will only send the email if you are in production (assuming using Cake's default debug levels -
0, 1, 2but this might create a lot of extra work. The question in uzyn's comment looks like a more robust solution.