vectorial1024 / laravel-gmail
Gmail transport for Laravel, to send emails using Google Service Account Key, for Google Workspace
Fund package maintenance!
Requires
- php: ^8.3
- google/apiclient: ^2.0
- illuminate/support: ^12.0|^13.0
Requires (Dev)
- orchestra/testbench: ^10.0|^11.0
- phpunit/phpunit: ^12.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-09-10 15:32:15 UTC
README
Gmail transport for Laravel, to send emails using Google Service Account Key, for Google Workspace
Note: this is currently a WIP!
Situation
As of writing, there are several Laravel packages for sending emails from Google Workspace via Gmail. However, they all have some kind of problems:
- Some do not support latest Laravel versions
- Some do not support Google Service Account Key
"Just use SMTP, right?"
"Just use SMTP", you say. However, as of March 2025, Google has deprecated "less secure apps" usage, which impacts Gmail integration:
CalDAV, CardDAV, IMAP, SMTP, and POP will no longer work with legacy passwords (basic authentication).
There are currently two ways to integrate with Gmail:
- Using Google Service Account Keys (you are here), mostly for Google Workspace integration
- using OAuth2, mostly for personal accounts
Again, this package deals with using Google Service Account Key from Google Workspace to send email. This package does NOT deal with using OAuth2 tokens to send email.
Install
via Composer:
#todo
Change log
Please see CHANGELOG.md.
Usage
(WIP)
Testing
PHPUnit (using orchestra/testbench) via Composer:
(WIP)
composer run-script test