Laravel SMTP
Set up Laravel's mail configuration to send through eusend over SMTP — Mailables, notifications, and queued mail, DKIM-signed and tracked.
Laravel ships with an SMTP mail transport, so sending through eusend is a matter
of environment variables — no package to install. Every Mail::send, Mailable,
and notification then routes through eusend, DKIM-signed and tracked.
.env
MAIL_MAILER=smtp
MAIL_SCHEME=smtps # implicit TLS on 465
MAIL_HOST=smtp.eusend.dev
MAIL_PORT=465
MAIL_USERNAME=eusend # always the literal string "eusend"
MAIL_PASSWORD=eu_live_xxxxxxxxxxxx
MAIL_FROM_ADDRESS=no-reply@yourdomain.com # must be a verified domain
MAIL_FROM_NAME="Acme"config/mail.php already reads these variables — no edit needed there.
MAIL_SCHEME takes smtps (implicit TLS, port 465) — not ssl or tls. STARTTLS on 587 is
not supported.
Older Laravel versions
Laravel 12 and later read MAIL_SCHEME. If your config/mail.php has an encryption key
instead of scheme — Laravel 10 and earlier, and Laravel 11 apps that kept their original
config — set MAIL_ENCRYPTION=ssl in place of MAIL_SCHEME=smtps. Everything else is the same.
Send an email
use Illuminate\Support\Facades\Mail;
Mail::raw('Order #1234 is on its way.', function ($message) {
$message->to('alice@example.com')
->subject('Your order has shipped');
});After editing .env, clear the cached config so the new values take effect:
php artisan config:clearConnection reference
| Variable | Value |
|---|---|
MAIL_HOST | smtp.eusend.dev |
MAIL_PORT | 465 |
MAIL_SCHEME | smtps (MAIL_ENCRYPTION=ssl on older apps) |
MAIL_USERNAME | eusend |
MAIL_PASSWORD | your eusend API key (eu_live_…) |
MAIL_FROM_ADDRESS | an address on a verified domain |
Use an eu_test_ key while building — sends are tracked but not delivered. See
the SMTP overview for limits and status codes.
Troubleshooting
| Symptom | Cause and fix |
|---|---|
The "ssl" scheme is not supported; supported schemes for mailer "smtp" are: "smtp", "smtps". | MAIL_SCHEME only accepts smtp or smtps. Set MAIL_SCHEME=smtps. The same error names tls if that is what you set. |
Failed to authenticate on SMTP server with username "eusend" | Read the response text. Invalid credentials means the username is not the literal eusend or the API key is wrong. A message naming a domain means the From address is on a domain you have not verified. |
Connection could not be established with host "ssl://smtp.eusend.dev:465" | Your host blocks outbound port 465. There is no alternate port — ask your host to open it, or send through the HTTP API. |
| The send hangs, then times out | MAIL_PORT is 587 or 25, or MAIL_SCHEME=smtp on port 465. eusend only accepts implicit TLS on 465. |
535 Too many failed attempts or 421 Connection rejected | Repeated failed logins block your IP address for up to an hour. Fix the credentials, then wait before retrying. |
New .env values are ignored | The config is cached. Run php artisan config:clear (and restart queue workers, which keep the old config in memory). |
| Nothing arrives and no error is raised | MAIL_MAILER is still log, the default in a new app, so mail is written to storage/logs/laravel.log. Queued mail also needs php artisan queue:work running. |
See the SMTP overview for the full status-code table.
Django SMTP
Configure Django's email backend to send through eusend over SMTP — password resets, notifications, and any send_mail call, DKIM-signed and tracked.
Rails SMTP
Configure Action Mailer to deliver through eusend over SMTP — mailers, Devise emails, and any deliver_now/deliver_later, DKIM-signed and tracked.