Skip to main content

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.

bash
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:latest

2. Set the DSN

One line in your .env. No username, password or TLS setup is needed. The Spiral Framework uses the same line.

dotenv
# .env
MAILER_DSN=smtp://127.0.0.1:1025

3. 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.

Checked on with Buggregator v2.8.0

Setup in 60 seconds

No registration. No account. Start it and point your app at it.

1

Start Buggregator

One file, installed with one command. The web UI opens on port 8000. Prefer containers? Use the Docker tab.

$ curl -fsSL https://raw.githubusercontent.com/buggregator/server/master/scripts/install.sh | sh
$ HTTP_ADDR=127.0.0.1:8000 \
  SMTP_ADDR=127.0.0.1:1025 \
  VAR_DUMPER_ADDR=127.0.0.1:9912 \
  MONOLOG_ADDR=127.0.0.1:9913 \
  PROXY_ADDR=127.0.0.1:8080 \
  ~/.local/bin/buggregator

The script picks the file for your CPU: Intel/AMD or ARM.

One file for Linux, macOS and Windows, about 40 MB. Nothing else to install.

This run line keeps it on this computer. Without the *_ADDR settings it listens on all network interfaces →

Rather not run a script? Download the file yourself →

Runs on Windows, macOS and Linux, on Intel/AMD and ARM.

Prefer not to do it yourself? Your AI agent can set Buggregator up for you →