beebmx/kirby-email-plus

Kirby Email Plus extends Kirby's email capabilities by adding support for multiple email services using the same Kirby email API.

Fund package maintenance!
beebmx

Installs: 6

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

Type:kirby-plugin

pkg:composer/beebmx/kirby-email-plus

1.1.1 2025-11-03 21:11 UTC

This package is auto-updated.

Last update: 2025-11-03 21:12:25 UTC


README

Build Status Total Downloads Latest Stable Version License

Email Plus for Kirby

Kirby has a built-in email engine with support for mail and smtp transports. However, sometimes you may need more support for other email services like Mailgun or Resend. Kirby Email Plus extends Kirby's email capabilities by adding support for multiple email services using the same Kirby email API.

Email Plus

Overview

Installation

composer require beebmx/kirby-email-plus

Additionally to installing the Email Plus plugin, you need to install the email service package you want to use.

Mailgun installation

To use Mailgun as your email transport, you need to install the mailgun/mailgun-php package:

composer require mailgun/mailgun-php symfony/http-client nyholm/psr7

Resend installation

To use Resend as your email transport, you need to install the resend/resend-php package:

composer require resend/resend-php

Usage

With Kirby Email Plus you can choose between the built-in Kirby email transports (mail and smtp) and the new ones added by this plugin (mailgun and resend).

First you need to configure the email transport you want to use in your config.php file:

return [
    'beebmx.email-plus' => [
        'type' => 'resend',
        'resend.key' => 're_XXXXXXXXXXXXXXXX',
    ],
];

Then, you can send emails using the Kirby email API as usual:

$kirby->email([
    'from'    => 'welcome@supercompany.com',
    'replyTo' => 'no-reply@supercompany.com',
    'to'      => 'someone@gmail.com',
    'cc'      => 'anotherone@gmail.com',
    'bcc'     => 'secret@gmail.com',
    'subject' => 'Welcome!',
    'body'    => 'It\'s great to have you with us',
  ]);

For convinience, you can also set the type directly in the transport configuration:

return [
    'email' => [
        'transport' => [
            'type' => 'resend',
        ],
    ],
    'beebmx.email-plus.resend.key' => 're_XXXXXXXXXXXXXXXX',
];

Options

Option Type Default Description
beebmx.email-plus.type string null Define the email transport mailgun or resend
beebmx.email-plus.mailgun.domain string null Define your mailgun domain to send emails.
beebmx.email-plus.mailgun.endpoint string https://api.mailgun.net https://api.eu.mailgun.net for EU servers.
beebmx.email-plus.mailgun.key string null Define your API Key for mailgun
beebmx.email-plus.resend.key string null Define your API Key for resend

Here's an example of a full use of the options from the config.php file:

return [
  'beebmx.email-plus' => [
      'type' => 'resend', // mailgun or resend
      'mailgun' => [
          'domain' => 'example.com',
          'endpoint' => 'https://api.mailgun.net',
          'key' => 'key-XXXXXXXXXXXXXXXX',
      ],
      'resend' => [
          'key' => 're_XXXXXXXXXXXXXXXX',
      ],
  ],
];

License

Licensed under the MIT.

Credits