PHPackages                             zaxbux/wn-gmaildriver-plugin - 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. zaxbux/wn-gmaildriver-plugin

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

zaxbux/wn-gmaildriver-plugin
============================

Send email with Gmail using this driver plugin.

v1.1.0(3y ago)78327[1 PRs](https://github.com/zaxbux/wn-gmaildriver-plugin/pulls)MITPHPPHP &gt;=7.4

Since Jun 5Pushed 2y ago2 watchersCompare

[ Source](https://github.com/zaxbux/wn-gmaildriver-plugin)[ Packagist](https://packagist.org/packages/zaxbux/wn-gmaildriver-plugin)[ Docs](https://github.com/zaxbux/wn-gmaildriver-plugin)[ RSS](/packages/zaxbux-wn-gmaildriver-plugin/feed)WikiDiscussions main Synced today

READMEChangelog (6)Dependencies (2)Versions (19)Used By (0)

Gmail Mailer Driver
===================

[](#gmail-mailer-driver)

[![GitHub](https://camo.githubusercontent.com/604bf04902a12a8511fb92b0462d267e602ef8750cac79b9f69d83c80d570495/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7a61786275782f776e2d676d61696c6472697665722d706c7567696e)](https://camo.githubusercontent.com/604bf04902a12a8511fb92b0462d267e602ef8750cac79b9f69d83c80d570495/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7a61786275782f776e2d676d61696c6472697665722d706c7567696e)[![Packagist PHP Version Support](https://camo.githubusercontent.com/d56f1e7c344024c78f5f5406dd20f79ca3b3ce04e2b6ede2491aef56ed0e6873/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7a61786275782f776e2d676d61696c6472697665722d706c7567696e)](https://camo.githubusercontent.com/d56f1e7c344024c78f5f5406dd20f79ca3b3ce04e2b6ede2491aef56ed0e6873/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f7a61786275782f776e2d676d61696c6472697665722d706c7567696e)[![GitHub tag (latest by date)](https://camo.githubusercontent.com/dc0af4e1535ae0fc7cf92db20783e5f8709797574725d73149a5dee984d6e34d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f7a61786275782f776e2d676d61696c6472697665722d706c7567696e)](https://camo.githubusercontent.com/dc0af4e1535ae0fc7cf92db20783e5f8709797574725d73149a5dee984d6e34d/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f7a61786275782f776e2d676d61696c6472697665722d706c7567696e)[![Packagist Version](https://camo.githubusercontent.com/e77add1095b95a5aa20b9262342da50ba20ce0f1548450ea5e591b44ee1d9c4c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a61786275782f776e2d676d61696c6472697665722d706c7567696e)](https://camo.githubusercontent.com/e77add1095b95a5aa20b9262342da50ba20ce0f1548450ea5e591b44ee1d9c4c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a61786275782f776e2d676d61696c6472697665722d706c7567696e)

Send email with Gmail using this driver plugin for Winter CMS.

> **Note:** You must use version [1.0.15](https://github.com/zaxbux/wn-gmaildriver-plugin/releases/tag/v1.0.15) with Winter CMS &lt; v1.2.

> **Note:** You must use at least version [1.1.0](https://github.com/zaxbux/wn-gmaildriver-plugin/releases/tag/v1.0.15) with Winter CMS &gt;= v1.2. This version of Winter has introduced changes to the way mail transports are configured (See *Installing* for more info).

Installing
----------

[](#installing)

```
composer require zaxbux/wn-gmaildriver-plugin
```

In your Winter CMS `config/mail.php`, add the **gmail** transport to the **mailers** array:

```
'mailers' => [

	// ...

	'gmail' => [
		'transport' => 'gmail',
	],

	// ...
],
```

Requirements
------------

[](#requirements)

- A Gmail account. Google Workspace (G Suite) accounts are also supported, if your administrator has enabled access.
- Gmail API credentials (see below).

Plugin Settings
---------------

[](#plugin-settings)

The plugin is configured in your backend settings. Change the mail method to `Gmail` in **Mail configuration** and configure your API credentials. Obtain API credentials from the [Google Cloud Console](https://console.cloud.google.com/apis/credentials).

### Obtaining API Keys

[](#obtaining-api-keys)

[Read instructions on obtaining API keys](https://github.com/zaxbux/wn-gmaildriver-plugin/wiki/Documentation#obtaining-api-keys)

### Testing delivery

[](#testing-delivery)

To make sure everything is working, try test sending a mail template to yourself.

### Revoking access

[](#revoking-access)

In case you want to revoke access, click the **Revoke Authorization** or **Reset to default** buttons on the *Gmail configuration* page. This will delete the credentials and access tokens. You may also want to [remove app access on your Google account](https://support.google.com/accounts/answer/3466521).

Important Notes
---------------

[](#important-notes)

- The Gmail API will only send emails as the account which you granted access with, it is currently not possible to send email as another user.
- The Gmail API has [sending limits](https://developers.google.com/gmail/api/reference/quota) for [free (consumer)](https://support.google.com/mail/answer/22839#zippy=you-have-reached-a-limit-for-sending-mail) and [paid (Workspace)](https://support.google.com/a/answer/166852#limits) accounts.
- You can send email using another email address under your control, using an alias. [Learn more about configuring sending aliases in this Google Support article](https://support.google.com/mail/answer/22370). Change the *Sender email* in **Mail configuration** to match your alias. The *Sender Name* does not have to match and can be whatever you choose.
- The authorization tokens expire if not used for 6 months or if you change your Google account password.

Advanced Usage
--------------

[](#advanced-usage)

This section is for advanced users.

### Providing credentials

[](#providing-credentials)

To provide the OAuth credentials without entering them through the backend UI, you can add them in the `config/mail.php` file. This is useful if you want to provide credentials using an environment variable. By default, the contents of the `GOOGLE_APPLICATION_CREDENTIALS_JSON` environment variable will be used.

Example:

```
'mailers' => [
	'gmail' => [
		'transport' => 'gmail',
		// ...

		'client_id' => '...',      // Your OAuth client ID
		'client_secret' => '...',  // Your OAuth client secret

		// ...
	],
],
```

### Authentication Scopes

[](#authentication-scopes)

To change the authentication scopes (permissions requested from the user), you can override the default scopes in the `config/mail.php` file. Add scopes to the `mail/mailers.gmail.scopes` array. For the plugin to function correctly, the `gmail.send` scope is required (this scope is always included by the plugin). [Gmail Auth Scopes](https://developers.google.com/gmail/api/auth/scopes)

Example:

```
'mailers' => [

	// ...

	'gmail' => [
		'transport' => 'gmail',

		// ...

		'scopes' => [
			\Google_Service_Gmail::GMAIL_READONLY,
		],
	],

	// ...
],
```

Change Log
----------

[](#change-log)

- **1.1.0** - Support for Winter CMS 1.2, Laravel 9, and PHP 8.
- **1.0.16** - Fixed localization key issue and updated dependencies.
- **1.0.15** - Fixed migration to Winter ([@mjauvin](https://github.com/mjauvin))
- **1.0.14** - Removed requirement to upload JSON file, client secret is now encrypted in DB.
- **1.0.13** - Added Gmail alias documentation, added ability to pass credentials via environment vars.
- **1.0.12** - Improve UI.
- **1.0.11** - Increased max sending size to 35MB (encoded message size).
- **1.0.10** - Added ability to change auth scopes used with the Google API client.
- **1.0.9** - Improved localization.
- **1.0.8** - Plugin requires elevated permissions to function on restore password page.
- **1.0.7** - Added settings permissions
- **1.0.6** - Added authorization status dashboard widget.
- **1.0.5** - Cleaned up Gmail API authorization flow.
- **1.0.4** - Fixed issue where backend authorization status showed expired when it was authorized.
- **1.0.3** - Fixed logic issues, app is removed from user account when settings are reset. Updated dependencies.
- **1.0.2** - Fixed errors that occur when invalid credentials are supplied.
- **1.0.1** - First version.

Acknowledgments
---------------

[](#acknowledgments)

- [@alxy](https://github.com/alxy) - Increased max sending size to 35MB.

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 89.8% 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 ~77 days

Recently: every ~173 days

Total

17

Last Release

1294d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7ae032d25f619273beec8d59f00b482942ed8649eb274f5d310ef6dc30bd84eb?d=identicon)[zaxbux](/maintainers/zaxbux)

---

Top Contributors

[![zaxbux](https://avatars.githubusercontent.com/u/5186921?v=4)](https://github.com/zaxbux "zaxbux (53 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![alxy](https://avatars.githubusercontent.com/u/2057062?v=4)](https://github.com/alxy "alxy (2 commits)")[![mjauvin](https://avatars.githubusercontent.com/u/2013630?v=4)](https://github.com/mjauvin "mjauvin (1 commits)")

---

Tags

emailgmailgooglewintercmswintercms-pluginworkspacegmailwinterwintercms

### Embed Badge

![Health badge](/badges/zaxbux-wn-gmaildriver-plugin/health.svg)

```
[![Health](https://phpackages.com/badges/zaxbux-wn-gmaildriver-plugin/health.svg)](https://phpackages.com/packages/zaxbux-wn-gmaildriver-plugin)
```

###  Alternatives

[winter/wn-builder-plugin

Builder plugin for Winter CMS

3938.3k](/packages/winter-wn-builder-plugin)[anod/gmail-imap

API to work with Gmail using IMAP built on top of Zend Imap Library

728.7k](/packages/anod-gmail-imap)[ahmedsamy/codeception-smtp-mail

Test emails in your Codeception acceptance tests

11172.7k1](/packages/ahmedsamy-codeception-smtp-mail)[winter/wn-translate-plugin

Translate plugin for Winter CMS

1626.9k3](/packages/winter-wn-translate-plugin)[swissup/module-email

Magento2 email providers integration (smtp, mandrill, amazon ses)

1412.8k1](/packages/swissup-module-email)[winter/wn-notes-plugin

Easily add notes to any record in WinterCMS

121.4k](/packages/winter-wn-notes-plugin)

PHPackages © 2026

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