|
| 1 | +--- |
| 2 | +order: 210 |
| 3 | +icon: flask |
| 4 | +--- |
| 5 | + |
| 6 | +# Mailpit and Mailhog |
| 7 | +Our TurboStack supports two _mail dev tools_ for you to choose from. |
| 8 | + |
| 9 | +`Mailpit` and `Mailhog` are developer tools for testing emails safely. They act like a local SMTP server. Your application “sends” emails to customer email addresses, but the emails are not actually delivered to them. |
| 10 | + |
| 11 | +Instead, the emails are captured and shown in a web interface, where developers can inspect the subject, content, headers, links, and formatting. |
| 12 | + |
| 13 | +Both tools are useful during development and automated testing because they prevent accidental real email delivery while making it easy to verify that email functionality works correctly. |
| 14 | + |
| 15 | +!!! info |
| 16 | +We currently recommend Mailpit over Mailhog, as the Mailhog project is no longer receiving updates! |
| 17 | +!!! |
| 18 | + |
| 19 | +## Enable it in the TurboStack GUI |
| 20 | +In the TurboStack GUI of your server, go to `Advanced` > `Mail Settings`, then click the toggle `Enable mail capturing and mail testing`. |
| 21 | + |
| 22 | +New options will then show, where you can choose between `Mailpit` and `Mailhog`. |
| 23 | + |
| 24 | +If you want to temporarily disable the service, you can do so with the `Mail Auto Intercept` toogle. |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | +## Enable it via the YAML editor |
| 29 | +To enable this via our YAML editor, add the following to the config: |
| 30 | + |
| 31 | +```yaml |
| 32 | +mail_devtool: mailpit |
| 33 | +``` |
| 34 | +
|
| 35 | +To temporarily disable the mail intercept, add the following line under `mail_devtool`: |
| 36 | + |
| 37 | +```yaml |
| 38 | +mail_auto_intercept: false |
| 39 | +``` |
| 40 | + |
| 41 | +## Accessing the tool GUI |
| 42 | + |
| 43 | +To access the tool, you can do so by going to the IP or domain of your application and append |
| 44 | +- `http://[IP_OR_DOMAIN]/mailpit` for Mailpit |
| 45 | +- `http://[IP_OR_DOMAIN]/mailhog` for Mailhog |
| 46 | + |
| 47 | +You will then get a `Basic Auth` prompt where you'll need to enter the credentials of a _system user_. These login details can be found in the **Credentials** tab of your server in the TurboStack GUI. |
0 commit comments