https://github.com/oralunal/gmail-api-for-laravel
A Laravel package that allows you to use Gmail API as a mail driver.
https://github.com/oralunal/gmail-api-for-laravel
gmail laravel php
Last synced: 3 months ago
JSON representation
A Laravel package that allows you to use Gmail API as a mail driver.
- Host: GitHub
- URL: https://github.com/oralunal/gmail-api-for-laravel
- Owner: oralunal
- License: mit
- Created: 2025-09-25T03:45:33.000Z (10 months ago)
- Default Branch: main
- Last Pushed: 2026-03-24T06:47:21.000Z (4 months ago)
- Last Synced: 2026-03-25T08:22:09.097Z (4 months ago)
- Topics: gmail, laravel, php
- Language: PHP
- Homepage:
- Size: 9.77 KB
- Stars: 6
- Watchers: 0
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Gmail API For Laravel
[](https://packagist.org/packages/oralunal/gmail-api-for-laravel)
[](https://packagist.org/packages/oralunal/gmail-api-for-laravel)
A Laravel package that allows you to use Gmail API as a mail driver.
## Features
- Use Gmail API instead of SMTP
- Using OAuth 2.0 for server-to-server authentication
- Full Laravel mail system integration
- Laravel 12.x support
- Auto-discovery (no manual registration needed)
## Support me
Your support is not required or expected, but we would appreciate it.
## Installation
You can install the package via composer:
```bash
composer require oralunal/gmail-api-for-laravel
```
Below are the contents of the published config file:
```php
return [
'credentials_json_full_path' => env('GMAIL_API_CREDENTIALS_JSON_FULL_PATH', false),
];
```
You should update the `credentials_json_full_path` value in your `.env` file.
```
GMAIL_API_CREDENTIALS_JSON_FULL_PATH=/full/path/to/credentials.json
```
## Usage
Update `MAIL_MAILER` and `MAIL_FROM_ADDRESS` in your `.env` file.
```
MAIL_MAILER=gmail-api
MAIL_FROM_ADDRESS=you@domain.com
```
## Credits
- [Oral Ünal](https://github.com/oralunal)
- [All Contributors](../../contributors)
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.