Docs Laravel password reset email
Laravel password reset email
Send Laravel password-reset mail with HTTP and X-API-Key, or the official PHP mailer transport.
ResenderMail is a sending API. Auth stays X-API-Key (not Bearer). Call it from your server after you generate the reset token the usual Laravel way.
Prerequisites
- Verified domain and sender identity (Get started)
- API key in
.envasRESENDERMAIL_API_KEY - PHP 8.1+ with
curl(or the official SDK)
Option A — HTTP + X-API-Key
Useful when you want an explicit request in a notification or listener:
use Illuminate\Support\Facades\Http;
Http::withHeaders([
'X-API-Key' => config('services.resendermail.key'),
'Content-Type' => 'application/json',
])->post('https://api.resendermail.com/api/v1/emails', [
'from' => 'Your App <noreply@yourdomain.com>',
'to' => [$user->email],
'subject' => 'Reset your password',
'html' => '<p><a href="'.$resetUrl.'">Reset password</a></p>',
'text' => 'Reset your password: '.$resetUrl,
])->throw();
Map the key in config/services.php:
'resendermail' => [
'key' => env('RESENDERMAIL_API_KEY'),
],
A successful send returns 200 with id and status (Queued). Look up delivery with GET /api/v1/emails/{id} and the same X-API-Key.
Option B — Official Laravel mailer
composer require resendermail/resendermail-php
RESENDERMAIL_API_KEY=ep_live_...
MAIL_MAILER=resendermail
In config/mail.php:
'mailers' => [
'resendermail' => ['transport' => 'resendermail'],
// ...
],
Then your existing Mail::to($user)->send(...) / password-reset notifications go through ResenderMail. Attachments are not supported yet.
You can also call the API via the facade:
use ResenderMail\Laravel\Facades\ResenderMail;
ResenderMail::emails()->send([
'from' => 'Your App <noreply@yourdomain.com>',
'to' => $user->email,
'subject' => 'Reset your password',
'html' => '<p><a href="'.$resetUrl.'">Reset password</a></p>',
'text' => 'Reset your password: '.$resetUrl,
]);
Wiring a reset URL
Generate the signed reset URL with Laravel’s password broker (or Fortify/Breeze/Jetstream helpers), then pass that absolute URL into html / text. Do not put the API key in Blade or the browser.
See Send email for payload fields and error codes.