Laravel SMTP: six lines in your .env
Notifications, password resets and mailables: Laravel sends through SMTP Senpai by changing only the .env file.
- 14-day free trial
- Servers and data in the EU
- A log of every delivery
MAIL_MAILER=smtp MAIL_HOST=relay.mailsenpai.com MAIL_PORT=2525 MAIL_USERNAME=your-username MAIL_PASSWORD=your-password [email protected] MAIL_FROM_NAME="${APP_NAME}" # up to Laravel 10: MAIL_ENCRYPTION=tls
Four details, and your emails go out
They are the same for every program: you also find them, already filled in, in your customer area.
The sender must be on a domain verified in your area: otherwise the server refuses to send. For SPF, DKIM and DMARC records, use the free email DNS checker.
Three steps
Copy the details
You find username and password in the customer area, SMTP Senpai page.
Update .env
Paste the lines and, if you cache your config, run php artisan config:clear.
Test it
With php artisan tinker: Mail::raw('Test', fn ($m) => $m->to('[email protected]')->subject('Test'));
Frequently asked questions
Do I need MAIL_ENCRYPTION?
Not from Laravel 11: on port 2525 STARTTLS starts automatically. Up to Laravel 10, set MAIL_ENCRYPTION=tls.
Do queued mails work?
Yes: queued mailables use the same SMTP mailer when the worker sends them.
Can I send without SMTP?
Yes, with the SMTP Senpai API and the key from the customer area; for Laravel, SMTP is the simplest route.
More integration guides
Try SMTP Senpai with your own software
A 14-day trial: connect your software, send your real emails and check the log line by line. Then decide.