Sending Emails
Magic-link login, account notifications, and license alerts depend on reliable email delivery. Use this page when setting up transactional email for your members.
Recommended setup
- Use a transactional provider (Postmark, Resend, Mailgun, SendGrid, etc.).
- Store SMTP/API credentials in
.envand inject them inready.
<?php
return [
'auth' => [
'methods' => ['code', 'magic-link'],
'challenge' => [
'email' => [
'from' => 'noreply@example.com',
'fromName' => 'Example',
],
],
],
'ready' => function () {
return [
'email' => [
'transport' => [
'type' => 'smtp',
'host' => env('SMTP_HOST'),
'port' => 587,
'security' => true,
'auth' => true,
'username' => env('SMTP_USERNAME'),
'password' => env('SMTP_PASSWORD'),
],
],
];
},
];
Local testing
Use tools like Mailhog or Mailtrap for local or staging environments to prevent accidental production emails.