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.
SMTP_RELAY_HOST=smtp.gmail.com \
SMTP_RELAY_USERNAME=me@gmail.com \
SMTP_RELAY_PASSWORD=app-password \
SMTP_RELAY_ALLOWED_RECIPIENTS=me@gmail.com \
buggregatorThe 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.
MAIL_MAILER=smtp
MAIL_HOST=127.0.0.1
MAIL_PORT=10254. 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.
Docs: docs.buggregator.dev/config/smtp.html#send-to-a-real-inbox
Requires Buggregator v2.13.0+
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
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.
- 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
Wait for the confirmation email in an E2E test
Call /api/smtp/messages/wait from your E2E test. It returns the matching email as soon as it arrives, or 408 on timeout. No fixed sleeps.
Checked on with Buggregator v2.13.0