Testing email sending via SMTP
Author: Jakub Sydor
The problem
It is not uncommon in our applications to send emails to our users. Despite the fact that we are increasingly using a third party services (such as AWS SES, SendGrid, etc.) for this, we sometimes have a requirement to connect to the client's SMTP server and use it to send messages. We then face the problem of how to test such messaging functionality automatically in E2E or integration testing. In such a case, the MailHog tool comes to rescue.