Safely sending email in development environments

In a fresh Kickstarter-based development environment you cannot really send emails, because there is no SMTP server configured to be used:

cmsbs.mail.smtpserver = "none"

However, you can still open Tools / Mail Log in the GUI to inspect the last 20 outgoing emails. In many cases this is sufficient for a development environment.

If you want to really send email, you need to change cmsbs.mail.smtpserver to your smtp server:

This, however, sets you at risk of accidentally sending email to real people outside of your company!

The following configuration snippet will setup a second mail relay named vacuum that will just ignore every email it’s supposed to send while the default relay uses your real SMTP server to send emails to certain addresses or domains:

# Real SMTP server: cmsbs.mail.smtpserver = "smtp.acme.com" # Restrict to "*@acme.com": cmsbs.mail.relay.default.allow.toPattern = "@acme.com$" # New dummy relay: cmsbs.mail.relays = "vacuum" # Just swallow outgoing emails: cmsbs.mail.relay.vacuum.smtpserver = "none" # ... for everything BUT "*@acme.com": cmsbs.mail.relay.vacuum.deny.toPattern = "@acme.com$"