A fake SMTP server as one binary, no Docker
Buggregator is a fake SMTP server in one file. Install it with one command, run buggregator, and set your app's SMTP host to 127.0.0.1 and port to 1025. Every email your app sends lands in the inbox at http://127.0.0.1:8000 instead of a real mailbox. No Docker, no PHP, no database server.
Steps
1. Install the binary
On Linux and macOS, the install script picks the file for your system, checks its checksums and puts it in ~/.local/bin/buggregator. No sudo.
curl -fsSL https://raw.githubusercontent.com/buggregator/server/master/scripts/install.sh | shOn Windows, in PowerShell:
irm https://raw.githubusercontent.com/buggregator/server/master/scripts/install.ps1 | iex2. Start it
By default every port listens on all network interfaces. The flags keep the UI and SMTP on your machine only, and -db keeps your emails after a restart.
buggregator -http-addr 127.0.0.1:8000 -smtp-addr 127.0.0.1:1025 -db ./buggregator.dbIf ~/.local/bin is not in your PATH, run ~/.local/bin/buggregator.
On Windows, the installer does not add the binary to PATH. In PowerShell:
& "$env:LOCALAPPDATA\Programs\buggregator\buggregator.exe" -http-addr 127.0.0.1:8000 -smtp-addr 127.0.0.1:1025 -db .\buggregator.db3. Point your app's SMTP at it
Host 127.0.0.1, port 1025. A user name and password are optional: Buggregator accepts any, and a user name picks the project the email lands in. For a Laravel app:
MAIL_MAILER=smtp
MAIL_HOST=127.0.0.1
MAIL_PORT=1025For Symfony: MAILER_DSN=smtp://127.0.0.1:1025.
4. Send a test email without an app
curl speaks SMTP too. Write a small message and send it:
printf 'From: app@example.com\r\nTo: user@example.com\r\nSubject: Hello\r\n\r\nIt works.\r\n' > mail.txt
curl smtp://127.0.0.1:1025 \
--mail-from app@example.com \
--mail-rcpt user@example.com \
--upload-file mail.txtOpen http://127.0.0.1:8000. The email is there with its HTML preview, plain text, addresses, attachments and raw source.
Why it works
Buggregator includes an SMTP server on port 1025 that stores each email instead of delivering it. The same binary serves the web UI on port 8000, with the frontend and SQLite built in, so there is nothing else to install. If port 1025 is already taken, Buggregator stops at start with address already in use; move it with -smtp-addr :2525.
Related tips
- Mail
A local inbox for .NET apps, on Windows without Docker
Run Buggregator as a Windows program and point SmtpClient or MailKit at 127.0.0.1:1025. Every email lands in a local inbox. 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
Python smtplib mail to a local inbox
Send with smtplib to 127.0.0.1 on port 1025 and every email from your scripts lands in Buggregator. No TLS, no password, nothing leaves your machine.
- 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.
Checked on with Buggregator v2.13.0