Symfony Mailer to a local inbox, one line
Set the Symfony Mailer DSN to smtp://127.0.0.1:1025 in your .env. Every email your Symfony app sends then lands in Buggregator, with the HTML preview, attachments and raw source, and none of it reaches a real inbox.
Steps
1. Start Buggregator
Run the container. Port 8000 is the web UI, port 1025 is the SMTP server.
docker run --pull always \
-p 127.0.0.1:8000:8000 \
-p 127.0.0.1:1025:1025 \
-p 127.0.0.1:9912:9912 \
-p 127.0.0.1:9913:9913 \
ghcr.io/buggregator/server:latest2. Set the DSN
One line in your .env. No username, password or TLS setup is needed. The Spiral Framework uses the same line.
# .env
MAILER_DSN=smtp://127.0.0.1:10253. Use the service name in Docker Compose
If your app and Buggregator run in the same Compose stack, replace 127.0.0.1 with the Buggregator service name, for example smtp://buggregator:1025.
4. Send an email and open it
Trigger any email from your app, then open http://127.0.0.1:8000. You see the rendered HTML with a Desktop / Tablet / Mobile width switcher, the plain text version, From, To, CC, BCC and Reply-To, the attachments and the raw MIME source. Use the raw source when you need to debug encoding or headers.
Why it works
The smtp:// DSN sends mail over plain SMTP to the host and port you give it. Buggregator listens on port 1025 with a fake SMTP server that stores each email and shows it in the UI instead of delivering it.
Related tips
- Mail
Laravel mail to a local inbox, three .env lines
Set MAIL_MAILER, MAIL_HOST and MAIL_PORT in .env and every Laravel email lands in Buggregator with HTML preview and attachments. Nothing is delivered.
- Mail
Catch dev email in docker-compose with one service
Add Buggregator as a service in docker-compose.yml and set your app's mail host to its service name. Every email lands in the UI on port 8000.
- Mail
WordPress mail from a local site, caught
A small mu-plugin sends WordPress mail to Buggregator on 127.0.0.1:1025, only when WP_ENVIRONMENT_TYPE is local. Nothing reaches real users.
- Mail
Check an HTML email at phone width before it ships
Send your app's email to Buggregator on port 1025, then switch the HTML preview between Desktop, Tablet and Mobile width. Nothing reaches a real inbox.
Checked on with Buggregator v2.8.0