The Mail page catches every email your local applications send. Behind it is Mailpit, a small mail server for this Mac only: it accepts every mail, puts it into a local inbox and passes nothing on. So you test order confirmations, password mails and newsletters without any mail reaching a real recipient.
What you do here
- Start and stop Mailpit.
- Read your sites' mails: HTML and text view, headers, attachments, spam score.
- See test mails from your servers that you write under Remote › Mail with Only to the local Mailpit.
How to do it
- Click Start Mailpit at the top right. Once it runs, it says running · version. If Mailpit is not installed yet, install it on the Services page.
- Point your application at the SMTP server
127.0.0.1, port10025, without login and without encryption, for examplesmtp://127.0.0.1:10025. - Trigger a mail in your application, such as a test order.
- The mail appears in the view. Click it to open it.
In many cases step 2 is already done:
- PHP's
mail()function: WebDonkey adds asendmail_paththat forwards to Mailpit to thephp.iniof every PHP version, once. If the file already has asendmail_pathof its own, even a commented-out one, it stays untouched. If Mailpit is not running,mail()returns an error instead of sending a real mail. - Site packages: sites you create with the packages for Shopware 6, Laravel or Symfony get Mailpit as their mail server in their
.envright away.
Page layout
| Element | What it does |
|---|---|
| Start Mailpit | Starts Mailpit. While it starts, it says Starting…. |
| running · version | Mailpit runs in this version. |
| Open in browser | Opens the inbox in your browser. |
| Stop | Stops Mailpit. The caught mails stay stored. |
| View | Mailpit's inbox. While Mailpit is not running, it says: “Mailpit is not running yet.” |
When a new mail arrives, WebDonkey files a notification in the bell that leads straight to this page. Turn it off under Notifications at Mail in Mailpit. On the command line, wd mail lists the caught mails. More in Tasks, backups and logs.
What happens in the background
- Mailpit accepts mail over SMTP on
127.0.0.1:10025. The inbox runs on port 18025, but only under a secret path WebDonkey creates on the first start. The bare port answers 404. That protects the inbox from web pages in your browser that try to reach local ports. Open in browser knows the path. - If one of the ports is taken, a note at the top of the window says so and lets you free the port and start Mailpit again.
- Mailpit also appears on the Services page as a service of its own.
Free and Premium
The embedded view inside the app is Premium. On Free, Mailpit runs the same way and catches all mail. The view then shows the note Embedded mail view is Premium with Open in browser: you read the mails in your browser.
Troubleshooting
| What you see | Why | What to do |
|---|---|---|
| The mail does not arrive | The application uses another mail server | Check host and port in its configuration: 127.0.0.1, port 10025. |
Mail arrives, but not from mail() |
A sendmail_path of your own in php.ini points elsewhere |
Check sendmail_path under Edit configuration files. |
http://127.0.0.1:18025 shows 404 |
The inbox lives under a secret path | Use Open in browser. |
| Mailpit does not start, with a note about a taken port | Another program uses 10025 or 18025 | Free the port through the note. |