PHPackages                             pioneeringtechlab/laravel-gmail-oauth-mailer - 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. pioneeringtechlab/laravel-gmail-oauth-mailer

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

pioneeringtechlab/laravel-gmail-oauth-mailer
============================================

Gmail OAuth2 SMTP mail transport for Laravel 10, 11, and 12 using Symfony Mailer.

v1.0.0(1mo ago)02MITPHPPHP ^8.1

Since Jul 2Pushed 1mo agoCompare

[ Source](https://github.com/PioneeringTechLab/laravel-gmail-oauth-mailer)[ Packagist](https://packagist.org/packages/pioneeringtechlab/laravel-gmail-oauth-mailer)[ RSS](/packages/pioneeringtechlab-laravel-gmail-oauth-mailer/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (3)Versions (2)Used By (0)

Laravel Gmail OAuth Mailer
==========================

[](#laravel-gmail-oauth-mailer)

Gmail OAuth2 SMTP XOAUTH2 mail transport for Laravel 10, 11, and 12 using Symfony Mailer.

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

[](#installation)

Run the following command on your Laravel project root directory:

```
composer require pioneeringtechlab/laravel-gmail-oauth-mailer:^1.0
```

Publish config
--------------

[](#publish-config)

```
php artisan vendor:publish --tag=gmail-oauth-mailer-config
```

Configure Laravel mailer
------------------------

[](#configure-laravel-mailer)

In `config/mail.php`, add a mailer:

```
'mailers' => [
    // ...

    'gmail-oauth' => [
        'transport' => 'gmail-oauth',
    ],
],
```

Environment variables
---------------------

[](#environment-variables)

```
MAIL_MAILER=gmail-oauth
MAIL_FROM_ADDRESS=youraddress@gmail.com
MAIL_FROM_NAME="${APP_NAME}"

GMAIL_OAUTH_EMAIL=youraddress@gmail.com
GMAIL_OAUTH_CLIENT_ID=your-google-client-id
GMAIL_OAUTH_CLIENT_SECRET=your-google-client-secret
GMAIL_OAUTH_REFRESH_TOKEN=your-refresh-token

GMAIL_OAUTH_SCOPE=https://mail.google.com/
GMAIL_OAUTH_HOST=smtp.gmail.com
GMAIL_OAUTH_PORT=587
GMAIL_OAUTH_ENCRYPTION=tls
```

After editing env/config values:

```
php artisan config:clear
```

Notes
-----

[](#notes)

- For Gmail SMTP OAuth2, the usual scope is `https://mail.google.com/`.
- Port `587` normally uses `GMAIL_OAUTH_ENCRYPTION=tls`.
- Port `465` normally uses `GMAIL_OAUTH_ENCRYPTION=ssl`.
- This package refreshes the access token when Laravel creates the mail transport. It does not cache the access token.

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance90

Actively maintained with recent releases

Popularity2

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity42

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

Unknown

Total

1

Last Release

48d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/eb2e4b7e97c47122102e9eca3a2707f31d812f27d774197f62f27f130d128e49?d=identicon)[luisjg](/maintainers/luisjg)

---

Top Contributors

[![luisjg](https://avatars.githubusercontent.com/u/16617588?v=4)](https://github.com/luisjg "luisjg (1 commits)")

### Embed Badge

![Health badge](/badges/pioneeringtechlab-laravel-gmail-oauth-mailer/health.svg)

```
[![Health](https://phpackages.com/badges/pioneeringtechlab-laravel-gmail-oauth-mailer/health.svg)](https://phpackages.com/packages/pioneeringtechlab-laravel-gmail-oauth-mailer)
```

###  Alternatives

[illuminate/notifications

The Illuminate Notifications package.

483.1M1.2k](/packages/illuminate-notifications)[propaganistas/laravel-disposable-email

Disposable email validator

6023.2M7](/packages/propaganistas-laravel-disposable-email)[illuminate/mail

The Illuminate Mail package.

5910.7M574](/packages/illuminate-mail)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1239.7k25](/packages/fleetbase-core-api)

PHPackages © 2026

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