Servers & Services > MailHog

MailHog is an open source (MIT license) email testing tool for developers. It allows you to test the sending of emails using, for example, the PHP mail() function. If you have MailHog enabled, then all emails sent this way will automatically end up in MailHog and you can use the MailHog web interface to check if the email was sent correctly.

MAMP PRO - Servers & Services - MailHog

When MailHog is started, you will see in the upper right corner of the screen which ports are being used for SMTP and the web interface.

  • Include MailHog server in GroupStart
    Check this box if you want MailHog to start and stop automatically when the Start/Stop button in the toolbar is clicked.

  • View Sent Emails

    • Open MailHog GUI
      Click this button to open the MailHog GUI. Here you can view, delete, download and more.

      MAMP PRO - Servers & Services - MailHog GUI

    • Send Test Email
      Clicking this button will send a test email and open the MailHog web interface (GUI) in your default browser.

      MAMP PRO - Servers & Services - MailHog GUI with test email

  • Path to MailHog log file.
    The path to your MailHog log file. This log file is located at “/Applications/MAMP-PRO/logs/mailhog.log”.

Right-clicking on the MailHog entry in the sidebar opens a context menu with several options.

  • Add to GroupStart / Remove from GroupStart.
    These options allow you to add or remove MailHog from the GroupStart. If MailHog is added to the GroupStart, it will automatically start and stop when you click the Start/Stop button in the toolbar.

  • If MailHog is running

    • Restart Server
      This option allows you to restart MailHog individually.

    • Show mailhog-smtp.json….
      This option displays the MailHog configuration file (mailhog-smtp.json). It is displayed in read-only mode. This option is only active if the configuration file exists in the directory “/Library/Application Support/appsolute/MAMP PRO/conf/”. More information about the configuration file can be found here:

  • If MailHog is not running

    • Force stop server.
      If MailHog is running but MAMP PRO is unable to detect the correct status, the application may not be able to start or stop the server instances. Calling this function will help MAMP PRO regain control of MailHog.

Additional Information