Looking to hire Laravel developers? Try LaraJobs

laravel-gmail maintained by vectorial1024

Description
Gmail transport for Laravel, to send emails using Google Service Account Key, for Google Workspace
Author
Vectorial1024
Last update
2026/09/10 17:32 (dev-master)
License
Links
Downloads
0

Comments
comments powered by Disqus

laravel-gmail

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