PHPackages                             ad5jp/laravel-gmail - 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. ad5jp/laravel-gmail

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

ad5jp/laravel-gmail
===================

Laravel Mail Driver for Gmail API via Service Account

v4.0.4(9mo ago)711.6k↑88.1%1MITPHPPHP ^7.2|^8.0

Since Aug 8Pushed 9mo ago1 watchersCompare

[ Source](https://github.com/ad5jp/laravel-gmail)[ Packagist](https://packagist.org/packages/ad5jp/laravel-gmail)[ RSS](/packages/ad5jp-laravel-gmail/feed)WikiDiscussions main Synced 2d ago

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

Laravel Mailer for Gmail API
============================

[](#laravel-mailer-for-gmail-api)

This package allows you to use the Gmail API as a mailer in Laravel. You can send emails from Laravel via the Gmail API without modifying your existing code.

Instead of using OAuth, this package uses a service account for sending emails. This eliminates the need for user authentication processes and access token management, while ensuring the method does not fall under LSA (Less Secure Apps).

[日本語はこちら](README_JA.md)

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

[](#installation)

```
composer require ad5jp/laravel-gmail

```

Specify the version according to your environment:

- v4.x ... Laravel 9 and later
- v3.x ... Laravel 7 - 8
- v2.x ... Laravel 6 and earlier
- v1.x ... Laravel 6 and earlier with google/apiclient-service before v0.200.0

Usage
-----

[](#usage)

### 1. Create a Service Account on Google Cloud Platform

[](#1-create-a-service-account-on-google-cloud-platform)

1. Create a project in the Google Cloud Platform console.
2. Enable the Gmail API.
3. Create a service account, generate a key, and download it in JSON format.
4. In the Google Workspace admin console, set up "Domain-wide Delegation". Assign the scope `https://www.googleapis.com/auth/gmail.send` to the service account created above.

### 2. Place the Key

[](#2-place-the-key)

Place the JSON key downloaded in step 2 within your application. Ensure it is excluded from source control using .gitignore or similar.

### 3. Configure .env

[](#3-configure-env)

Change the value of `MAIL_MAILER` in your .env file to `gmail`. (Or change the 'default' value in config/mail.php)

For Laravel 6 and earlier, change the value of `MAIL_DRIVER` in your .env file to `gmail`. (Or change the 'driver' value in config/mail.php)

Add the following lines to your .env file:

```
GMAIL_FROM_ADDRESS={Sender's email address}
GMAIL_SERVICE_ACCOUNT_KEY={Path to the JSON key placed in step 2}

```

The sender's email address must be an email address within the Google Workspace organization set up in step 1 (4).

###  Health Score

41

—

FairBetter than 87% of packages

Maintenance58

Moderate activity, may be stable

Popularity31

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity53

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 ~35 days

Recently: every ~106 days

Total

13

Last Release

272d ago

Major Versions

v1.0.0 → v4.0.12024-08-08

v1.0.2 → v2.0.22024-08-23

v2.0.2 → v4.0.42025-10-05

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

laravel

### Embed Badge

![Health badge](/badges/ad5jp-laravel-gmail/health.svg)

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

###  Alternatives

[unopim/unopim

UnoPim Laravel PIM

10.5k2.4k](/packages/unopim-unopim)[api-platform/laravel

API Platform support for Laravel

58171.6k14](/packages/api-platform-laravel)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21318.6k3](/packages/ecotone-laravel)

PHPackages © 2026

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