3 ms·
I'd probably set SMTP_URI in my environment or as a java property and just use that to configure my SMTP service. While an Interface and DI might be useful for
by emidln 9y ago
I'd probably set SMTP_URI in my environment or as a java property and just use that to configure my SMTP service. While an Interface and DI might be useful for unit testing, when I'm testing in integration, ci, or qa environments, I'd want to make sure that I'm using an SMTP server that can't send emails to the outside world. Postfix is pretty easy to setup for this scenario (a whitelist of users/domains to forward mail for) so I can still test mail output.