Nº 01Guide
Catch test emails with Mailpit.
A staging site should not send order confirmations to real customers. Mailpit is a test inbox inside the project: the application sends as usual, the mail stays on the instance.
Updated:
02Guide
What Mailpit does
Mailpit runs as its own container in the project, accepts mail over SMTP and shows it in a web interface. The application reaches it at host mailpit on port 1025. It needs no credentials.
On Envbay there is a second safeguard: outgoing mail ports 25, 465 and 587 are closed. A forgotten SMTP setting cannot send anything.
03Guide
Step by step
- 01
Switch on Mailpit
When you create a project, tick Mailpit under services in the wizard step “Project & services”. In an existing project, open the “Services” tab and click “Add Mailpit” on the “Mailpit” card. That took just under five seconds in our test. Envoryx recreates the application containers with the new variables while doing so.
- 02
What the application gets
Envoryx passes the connection as environment variables. In our test the project terminal showed these seven:
MAILER_DSN=smtp://mailpit:1025 MAIL_ENCRYPTION=null MAIL_HOST=mailpit MAIL_MAILER=smtp MAIL_PORT=1025 SMTP_HOST=mailpit SMTP_PORT=1025 - 03
Laravel
Laravel reads
MAIL_*from the environment, so there is nothing to configure. The injected values win over your.env. To test from the project terminal:php artisan tinker --execute="Mail::raw('hello', fn (\$m) => \$m->to('test@example.com')->subject('Mailpit test'));" - 04
Symfony
Symfony reads
MAILER_DSNfrom the environment. The Symfony template comes with the mailer installed. The test command prints nothing on success; afterwards a mail with the subject “Testing transport” is in the inbox:php bin/console mailer:test test@example.com - 05
WordPress and older PHP
While Mailpit is active in the project, the PHP function
mail()ends up there too. WordPress therefore needs no SMTP plugin. Both commands returnedbool(true)in our test, and both mails were in the inbox:wp eval 'var_dump(wp_mail("test@example.com", "WP test", "hello"));' php -r 'var_dump(mail("test@example.com", "mail() test", "hello"));' - 06
Open the inbox
Open the “Services” tab of the project and click the address in the “Inbox” row of the “Mailpit” card. The address is the project name plus
-mailpit. Without being signed in to the instance it answers “Sign in required”.https://shop-mailpit.<customer>.envbay.dev
04Guide
Good to know
- Restarting the project empties the inbox. In our test it held two mails before the restart and none after.
- Without Mailpit there is no mail program in the project:
mail()andwp_mail()returnfalse. The same applies after you take Mailpit out again with “Remove Mailpit”. - A guest link opens the site of the project, not the inbox. Whoever should see the mail needs an account on the instance.
- Mailpit catches what arrives over SMTP or through
mail(). If your application sends through the HTTP API of a mail service, that bypasses Mailpit. Switch staging to SMTP or a log driver in that case. - The senders of the test mails in our test were
hello@example.com(Laravel),from@example.org(Symfony),wordpress@plus the project address (WordPress) andphp@envoryx.localhost(mail()).
We ran every step of this guide on an Envbay instance on the Starter plan on 10 November 2026: Envoryx 0.46.7, Mailpit 1.31, Laravel 13, the Symfony template and WordPress 7.1 with PHP 8.5.
04FAQ
Frequently asked questions.
Q.01Can I send real email from the instance?
Q.02Do I need credentials for Mailpit?
Q.03Do I need an SMTP plugin for WordPress?
05Guides
Keep reading
- Laravel staging serverLaravel staging with database, Redis, Mailpit and an HTTPS address, without maintaining a server yourself.Laravel staging
- Laravel in 10 minutesStep by step: open your instance, create a Laravel project, load the page and work through SSH in your IDE.Guides
- WordPress stagingStep by step to a WordPress test site with its own HTTPS address, a guest link for sign-off and the move of an existing site.Guides
Try it yourself.
Pick a plan, order, open your instance. Prices include 19% VAT.