Skip to main content

Send one caught Laravel email to your real Gmail

Start Buggregator with the SMTP_RELAY_* settings of a real mail server, such as Gmail with an app password. Then open a caught Laravel email and click Send to inbox. That one message goes to the address you type, and you open it in real Gmail, Outlook or on your phone. Nothing else is forwarded.

Steps

1. Get an app password

Gmail needs an app password for SMTP. Your normal password does not work here.

2. Start Buggregator with the relay

Run the binary on your own machine. Without login, the button works only there, with the UI opened as 127.0.0.1 or localhost. Set the server, your login and who may get mail.

bash
SMTP_RELAY_HOST=smtp.gmail.com \
SMTP_RELAY_USERNAME=me@gmail.com \
SMTP_RELAY_PASSWORD=app-password \
SMTP_RELAY_ALLOWED_RECIPIENTS=me@gmail.com \
buggregator

The port defaults to 587 with STARTTLS. SMTP_RELAY_ALLOWED_RECIPIENTS is required without login. It takes addresses or a whole domain, like *@mycompany.com. In Docker or behind a proxy, the button needs SSO on.

3. Point Laravel at Buggregator

Your app keeps sending to Buggregator, as before. Nothing reaches a real inbox on its own.

dotenv
MAIL_MAILER=smtp
MAIL_HOST=127.0.0.1
MAIL_PORT=1025

4. Send the one email you want

Open the email in Buggregator and click Send to inbox. Type your address. By default the message goes as it was caught, with its original To and Cc in the headers. Check Put these addresses in To to replace To with your address and drop Cc. The original recipients never get it.

Settings › Email relay shows whether sending is on and, if not, why.

Why it works

Buggregator catches every email on port 1025 and sends none. With SMTP_RELAY_HOST set, the button passes one stored message to that SMTP server, only to the addresses you type and allow. Limits: 20 addresses per email, 10 emails a minute.

Checked on with Buggregator v2.13.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