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.

  • Use a transactional provider (Postmark, Resend, Mailgun, SendGrid, etc.).
  • Store SMTP/API credentials in .env and inject them in ready.
<?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.

Kirby Klub is not affiliated with the developers of Kirby CMS. We are merely standing on the shoulder of giants.
© 2026 Bruno Meilick All rights reserved.