uSend Docs
SMTP guides

Laravel

Point Laravel's Mail facade at usend over SMTP.

Laravel's mail system works with usend out of the box. Settings used on this page: host smtp.usend.et, port 587 or 465, username usend, password your API key. Reference: Send with SMTP.

Configure .env

.env
MAIL_MAILER=smtp
MAIL_HOST=smtp.usend.et
MAIL_PORT=587
MAIL_USERNAME=usend
MAIL_PASSWORD=us_123456789
[email protected]
MAIL_FROM_NAME=Acme

Recent Laravel versions choose encryption from the port: 465 uses implicit TLS and 587 uses STARTTLS. On older versions also set MAIL_ENCRYPTION=tls for 587 or ssl for 465. To force implicit TLS in newer versions, set MAIL_SCHEME=smtps.

Clear cached configuration after changing it:

Shell
php artisan config:clear

Send

Nothing in your code changes:

PHP
use Illuminate\Support\Facades\Mail;

Mail::to('[email protected]')->send(new OrderShipped($order));

// or a quick text mail
Mail::raw('It works!', fn ($m) => $m->to('[email protected]')->subject('Hello from usend'));

Queue mail with ->queue(...) so sending never slows a request. Use a sending_access key limited to your domain for the password.

Check it

Shell
php artisan tinker
>>> Mail::raw('Test', fn ($m) => $m->to('[email protected]')->subject('Test'));

The message appears in the usend dashboard under Emails.

Troubleshooting

SymptomCause
535 Invalid API keyThe password is not a current key, or config:cache holds an old value.
554 ... domain is not verifiedMAIL_FROM_ADDRESS is not on a verified domain.
Sends to outsiders refusedYour organization is in the sandbox.
Connection timeoutYour host blocks outbound 587/465. Use the HTTP API instead.