PHPackages                             nerdcel/kirby-oauth2-email - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. nerdcel/kirby-oauth2-email

ActiveKirby-plugin[Mail &amp; Notifications](/categories/mail)

nerdcel/kirby-oauth2-email
==========================

Kirby Plugin to setup OAuth for SMTP Mail (e.g. Outlook, Gmail, Yahoo, etc.)

v0.4.2(4mo ago)3209↓50%1[1 issues](https://github.com/nerdcel/kirby-oauth2-email/issues)MITPHPPHP &gt;=8.3

Since Jan 29Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/nerdcel/kirby-oauth2-email)[ Packagist](https://packagist.org/packages/nerdcel/kirby-oauth2-email)[ RSS](/packages/nerdcel-kirby-oauth2-email/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (11)Versions (12)Used By (0)

Kirby OAuth2 Email
==================

[](#kirby-oauth2-email)

[![Kirby 5+](https://camo.githubusercontent.com/6d5f197051fb4e15910ec1ca7cda1b56369d1a1733f3b18ea95c74e0bce458f2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4b697262792d352b2d626c75652e737667)](https://getkirby.com)[![Release](https://camo.githubusercontent.com/5fc705ebb7670b9761a6342fbc21e403d73c596a4f48fc09a90cb251513fa74f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6e65726463656c2f6b697262792d6f61757468322d656d61696c)](https://github.com/nerdcel/kirby-oauth2-email/releases)[![License](https://camo.githubusercontent.com/c96806bd99d12ae5f767886e873cc02ca0ce1e8d0862d11511a3694550665c61/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6e65726463656c2f6b697262792d6f61757468322d656d61696c)](https://github.com/nerdcel/kirby-oauth2-email/blob/main/LICENSE)

This plugin is a Kirby extension that allows you to authenticate users via OAuth2 and their email address.

This plugin implements the OAuth2 flow for the following providers:

- Google
- Microsoft
- Yahoo
- Azure

Installation
------------

[](#installation)

```
composer require nerdcel/kirby-oauth2-email
```

Or download the [latest release](https://github.com/nerdcel/kirby-oauth2-email/releases) unzip it, copy it to `site/plugins/kirby-oauth2-email`.

Setup your OAuth2 provider
--------------------------

[](#setup-your-oauth2-provider)

You need to configure your OAuth2 provider to allow the authentication of your users. You need to create an OAuth2 application and get the client ID and client secret. At this point, I assume you have a basic understanding of OAuth2 and how to setup your provider.

You most likely need to provide a redirect URL, which is `https://your-site.tld/callback-path`. If this step is done, you can configure the plugin using the refresh token, client ID, and client secret (tenantId e.g. Azure). Once this is done you can configure the plugin.

Usage
-----

[](#usage)

Edit your `config.php` and add the following lines:

```
'nerdcel.kirby-oauth2-email' => [
    'callback-path' => 'callback-path', // default: 'email/oauth2'
    'enabled' => true, // default: false
    'email' => 'example@your-provider.tdl',
    'service' => 'azure', // google, microsoft, yahoo, azure
    'client-id' => 'your-client-id',
    'client-secret' => 'your-client-secret',
    'tenant-id' => 'your-tenant-id', // only for azure
    'refresh-token' => 'your-refresh-token', // received from the first login
]
```

RefreshToken renewal
--------------------

[](#refreshtoken-renewal)

The plugin will automatically renew the refresh token when an email is sent. The new refresh token will be written to `.oauth` file in the root of your Kirby installation. Make sure that the web server has write access to this file.

After you have configured the plugin, you should be able to send emails for example using the dreamform plugin or when you use the 2FA option for the panel.

Usefull links
-------------

[](#usefull-links)

- [PHPMailer Wiki](https://github.com/PHPMailer/PHPMailer/wiki/)
- [Mailtrap Blog](https://mailtrap.io/blog/phpmailer-office-365/#Send-email-using-Outlook-SMTP)

###  Health Score

38

—

LowBetter than 85% of packages

Maintenance67

Regular maintenance activity

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~31 days

Recently: every ~56 days

Total

11

Last Release

149d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/62cdaab427d91cc19875dc8a62e4bee3ff640b236ca5cde2ec4ca7f65fac0148?d=identicon)[nerdcel](/maintainers/nerdcel)

---

Top Contributors

[![nerdcel](https://avatars.githubusercontent.com/u/3840331?v=4)](https://github.com/nerdcel "nerdcel (46 commits)")

---

Tags

emailkirby4kirby4-pluginkirby5kirby5-pluginoauth2phpmailer

### Embed Badge

![Health badge](/badges/nerdcel-kirby-oauth2-email/health.svg)

```
[![Health](https://phpackages.com/badges/nerdcel-kirby-oauth2-email/health.svg)](https://phpackages.com/packages/nerdcel-kirby-oauth2-email)
```

###  Alternatives

[symfony/mime

Allows manipulating MIME messages

2.8k668.8M910](/packages/symfony-mime)[symfony/mailer

Helps sending emails

1.6k368.1M955](/packages/symfony-mailer)[matomo/matomo

Matomo is the leading Free/Libre open analytics platform

21.4k37.3k](/packages/matomo-matomo)[symfony/notifier

Sends notifications via one or more channels (email, SMS, ...)

80640.3M290](/packages/symfony-notifier)[contao/core-bundle

Contao Open Source CMS

1231.6M2.3k](/packages/contao-core-bundle)[flow-php/flow

PHP ETL - Extract Transform Load - Data processing framework

81733.7k](/packages/flow-php-flow)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
