Thanks to MailHog, we can preview the email in an easier way. MailHog simulates an outbox of your app; All emails sent by your app are captured and displayed in their respective versions: HTML, text, and MIME-Type.

How to install MailHog

This is an open source application and is writthen in the Go language. This is its public repository https://github.com/MailHog/MailHog

Instalation in Mac OS: 

Simply run:

brew install MailHog

Other OS:

You can manually download the application from: https://github.com/MailHog/MailHog/releases

After downloading it, you can run it with the command:

./MailHog

From the folder where you downloaded it

How to use MailHog

After installing and starting MailHog you can use it. In your preferred browser enter http://0.0.0.0:8025/ and you’ll see:

In this “outbox” you can see the list of emails that have been sent via SMTP from the machine where you have running MailHog. In addition, you can open the email to obtain the preview and see every detail of the email sent.

In conclusion, working with MailHog makes it easy for you to implement emails by previewing each of them without having to create several email accounts. It is very easy to use with frameworks such as Django or a CMS such as WordPress.

If you have comments or concerns do not hesitate to put them in the comments.

READ
Quick start with Django ORM

Comments