Laravel SMTP Setup with PlugSend (Port 587)
Configure Laravel to send transactional email through PlugSend SMTP on port 587. Includes env settings, testing, queues, and debugging.
hb+test2@local.test
Mar 17, 2026 • 4 min read
Laravel makes email feel easy—until it’s in production and a password reset doesn’t arrive, or Gmail starts rejecting you, or your queue is silently failing.
This guide is the “production version” of Laravel SMTP setup with PlugSend:
- env-driven configuration (host can change later)
- STARTTLS on port 587
- queue-first sending (recommended)
- debugging with message-id + PlugSend events (
submitted/delivered/bounced)
Quick answer
Set your Laravel mailer to SMTP with PlugSend on port 587, use an SMTP username created for your verified domain, and use your API key as the password.
1) PlugSend SMTP credentials (how they work)
- Host: use env, current example
send1.plugsend.net - Port:
587 - Encryption:
tls(STARTTLS) - Username: created in PlugSend and must belong to your verified domain (example:
admin@dropify.cash) - Password: API key
2) Recommended env vars
Even if you currently use MAIL_HOST=send1.plugsend.net, the best practice is to wrap it so it’s easy to change later.
# PlugSend SMTP
PLUGSEND_SMTP_HOST=send1.plugsend.net
PLUGSEND_SMTP_PORT=587
PLUGSEND_SMTP_USERNAME=admin@yourdomain.com
PLUGSEND_SMTP_PASSWORD=YOUR_API_KEY
PLUGSEND_SMTP_ENCRYPTION=tls
# Laravel mail
MAIL_MAILER=smtp
MAIL_HOST=${PLUGSEND_SMTP_HOST}
MAIL_PORT=${PLUGSEND_SMTP_PORT}
MAIL_USERNAME=${PLUGSEND_SMTP_USERNAME}
MAIL_PASSWORD=${PLUGSEND_SMTP_PASSWORD}
MAIL_ENCRYPTION=${PLUGSEND_SMTP_ENCRYPTION}
MAIL_FROM_ADDRESS=no-reply@yourdomain.com
MAIL_FROM_NAME="${APP_NAME}"
3) Send a quick test email
Use Tinker to validate connectivity and auth:
php artisan tinker
use Illuminate\Support\Facades\Mail;
Mail::raw('Hello from PlugSend', function ($m) {
$m->to('you@example.com')->subject('Test');
});
If this hangs or errors, jump to troubleshooting below.
4) Queueing (recommended for production)
If you send mail synchronously during web requests, you’ll eventually slow down user-facing endpoints or hit timeouts when SMTP is slow.
Good default:
- use a queue driver (database/redis)
- make your Mailable/Notification implement
ShouldQueue - run a worker under systemd/supervisor
Example: queued notification
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Notifications\Notification;
use Illuminate\Notifications\Messages\MailMessage;
class VerifyEmailNotification extends Notification implements ShouldQueue
{
use Queueable;
public function __construct(public string $code) {}
public function via($notifiable)
{
return ['mail'];
}
public function toMail($notifiable)
{
return (new MailMessage)
->subject('Verify your email')
->line("Your code is {$this->code}");
}
}
5) Debugging with PlugSend events
When users say “I didn’t get the email”, don’t guess. Trace.
submitted: Laravel handed it off successfullydelivered: recipient server accepted itbounced: recipient rejected it (reason matters)
To make this easy, log identifiers in your app:
- your internal notification id / user id
- recipient email
- timestamp
(We can also add a custom header like X-App-Message-Id later so correlation is perfect.)
6) Troubleshooting
Route 1: “auth failed” / SMTP 535
- Confirm
MAIL_PASSWORDis the PlugSend API key. - Confirm
MAIL_USERNAMEwas created for a verified domain. - Confirm you didn’t set quotes incorrectly in
.env(especially with special chars).
Route 2: connection timeout / cannot connect
- Confirm port is 587.
- Confirm your server/network can reach the SMTP host.
- If you were using port 25 anywhere, assume it’s blocked.
Route 3: emails land in spam
Most common causes:
- missing SPF/DKIM/DMARC
- From domain mismatch / alignment issues
- sending too much too fast (no warm-up)
- high bounce rate (keep sending to dead addresses)
Route 4: bounces
- Hard bounces: suppress address and stop retrying.
- Soft bounces: retry with backoff; don’t hammer providers.
7) Checklist
- [ ] Domain verified in PlugSend
- [ ] SMTP user created under that domain
- [ ] API key generated and stored securely
- [ ] Laravel configured via env vars (no hardcoding)
- [ ] Test email works in tinker
- [ ] Queue is enabled + worker running
- [ ] SPF + DKIM + DMARC set
CTA: Create a PlugSend account, verify your domain, create an SMTP user, generate an API key, and make Laravel email reliable.