[Tomatocart] – use mailhog to test email locally during development

Whilst you are developing your online store, it is a good idea to test the email notifications to ensure they work properly but also to ensure they look as you want them to. It isn’t always the best idea to send emails to a remote email server as it is better to catch emails locally and check it within a web interface.

In this article, I am going to show you a great SMTP testing tool called Mailhog.



Install the Mailhog

Step 1. Run following shell script to download Mailhog:



# Make it executable
 chmod +x $PATH_MAILHOG

Step 2. Run following shell script to make it start automatically on system boot:


sudo tee /etc/init/mailhog.conf <<EOL
description "Mailhog"
start on runlevel [2345]
stop on runlevel [!2345]
pre-start script
    mailhog 1>/dev/null 2>&1
end script

Update email options within Tomatocart admin panel

Step 1. Open admin panel > start menu > Configuration > Configuration > E-mail Options.


Step 2. Update options as following image shown:


  • Set E-Mail Transport Method to SMTP.
  • Set SMTP Server to localhost.
  • Set SMTP Server Port to 1025.
  • Set Enable SSL Connection to False.
  • Set Send E-mails to True.

The other email settings are optional.

View messages in the web UI

Now, all of the emails sent from TomatoCart system will be caught by Mailhog. It is possible to view the messages in the web UI at the port 8025 of your web server. You could use the IP address or store domain at the specific port to access it.  For example:

  • http://www.tomatocart.me:8025


Find Word

Mailhog is really an excellent email testing tool during development. Enjoy it.

Looking for quality TomatoCart hosting? Check out Arvixe Web Hosting

Tags: , , , , , , | Posted under TomatoCart | RSS 2.0

Author Spotlight

Jack Yin

TomatoCart Developer & Co Founder - Arvixe Web Hosting / TomatoCart Community Liaison

Leave a Reply

Your email address will not be published. Required fields are marked *