Despite being a bit rubbish, email is still one of the main ways people receive information from web based services. In non-production environments, whether development, test or pre-production, developers need to be able to see and test the emails that will be sent to real users, without the risk of those emails being sent out to the public.
Rather than hooking internal environments up to public mail servers, we provide an SMTP testing service that captures emails. GOSS staff and client developers can log into the web-based UI and view the captured mail.
MailDev
MailDev is an open source SMTP testing service.
In our hosting infrastructure we create a contained instance of MailDev for each non-production environment that needs to use a mail server (in practice that's all of them). Each MailDev instance has two ports, one for HTTP access, the other for SMTP. That means if we host your test, development and pre-production environments, you'll have three separate instances of MailDev. Each environment will be set up to use it's MailDev instance instead of our usual mail servers.
Configuring iCM
In our hosting infrastructure all environment variables are stored in a centrally managed repository. If you make any changes to the platform's configuration, let someone in our support or hosting teams know.
Mail server details are held in iCM's autoconfig, in the format <smtpserver>:<smtpport>. For example, tstsmtp1.ipa.int.storm50.com:2501.
When changes are made in autoconfig you must resend the configuration files to all of your API Servers. As well as the information in the iCM-managed config files, your API Servers are also passed environment information, including which mail server to use.
The Email worker can also be configured to use a specific mail server, rather than the platform's default. Double check the
You've Got Mail
Our hosting team will set up MailDev instances for you, and configure your non-production environments to use them. Once set up we'll let you know the URLs and the username and password for logging in.
You'll have a single user for each instance, which you'll need to share between your developers.
Emails are kept in memory, not long-term storage. This means data will be lost when the service is restarted. Emails are also deleted on a regular schedule - every Monday, Wednesday and Friday night. Do not expect to see historic emails.
It's not possible to forward emails from MailDev. We've designed this service to be transient, minimising any potential for personal data to be propagated to systems that are not properly managed and audited.
GOSS Staff
There's a more technical article on the intranet which explains how to set up MailDev instances.