Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Gmail

Laravel Gmail Laravel Package

dacastro4/laravel-gmail

dacastro4/laravel-gmail integrates the Gmail API with Laravel, offering OAuth authentication and a fluent PHP interface to send, read, search, and manage Gmail messages, threads, labels, and attachments without handling raw API requests.

View on GitHub
Deep Wiki
Context7

Laravel wrapper for the Gmail API

Frequently asked questions about Laravel Gmail
How do I install dacastro4/laravel-gmail in a Laravel app?
Install it with Composer using composer require dacastro4/laravel-gmail, then confirm the installed version matches your Laravel and PHP constraints. Laravel package discovery should register the service provider, but check the package documentation for any manual provider or alias setup. Publish or review the package configuration if documented, and add your Google OAuth credentials through environment variables rather than committing them.
Does dacastro4/laravel-gmail support Laravel 10 and Laravel 11?
Yes, v7.0 is described as adding Laravel 10.x and 11.x support. Teams on Laravel 9 or earlier should not assume a drop-in upgrade to v7.0 because the major version bump likely reflects dependency or support-matrix changes. Check the package composer.json and release tag for the exact Laravel and minimum PHP requirements before upgrading.
What Gmail API credentials and OAuth setup do I need for Laravel Gmail integration?
You need a Google Cloud project with the Gmail API enabled, an OAuth consent screen configured, and OAuth client credentials with an authorized redirect URI for your Laravel application. The package handles the Gmail API integration, but your app still needs to manage the OAuth callback, requested scopes, and credential storage. Review the package documentation for the exact configuration keys and redirect route.
How does dacastro4/laravel-gmail store and refresh Gmail OAuth tokens?
The package provides OAuth-based Gmail integration, but production token persistence and refresh handling remain part of your application design. You should confirm in the package docs and code where access and refresh tokens are stored, how expiry is detected, and what happens when refresh fails. Treat token storage as sensitive data and add operational monitoring around refresh errors and revoked consent.
Can I send, read, search, and manage Gmail messages, threads, labels, and attachments with this package?
Yes, the package is intended to offer a fluent PHP interface for sending, reading, searching, and managing Gmail messages, threads, labels, and attachments without writing raw Gmail API requests. That makes it a fit for Laravel applications that need first-party Gmail mailbox operations. You should still validate the specific methods and scopes required for your workflows in a development Gmail account.
Is dacastro4/laravel-gmail v7.0 a breaking change from older versions?
Treat v7.0 as a compatibility boundary because it is a major version release focused on Laravel 10.x and 11.x support plus an address-handling fix. The provided release notes do not explicitly enumerate breaking changes, so validate your Laravel version, PHP version, Google API client dependencies, and mailbox flows before adopting it. Teams on Laravel 9 or earlier should plan carefully rather than assuming a drop-in upgrade.
How should I test Gmail OAuth and message flows before production?
Use mocked or faked Google API clients for unit tests covering message composition, address parsing, and error paths, and use a dedicated Gmail test account for integration tests. Test the OAuth callback, token refresh, send, read, search, attachment, thread, label, and address-parsing flows before staging. Also add regression tests for recipients supplied as strings, Address objects, display names, and malformed addresses because v7.0 includes an address-handling fix.
What production risks should I plan for with Gmail API quotas and OAuth tokens?
Plan for Gmail API quotas, rate limiting, retries, and clear handling of API errors rather than assuming every send or read succeeds. OAuth consent-screen configuration, scope changes, refresh-token failures, and revoked access are operational risks that need monitoring and alerting. Queue workers and config caching should also be validated because mailbox jobs can fail or behave differently under production settings.
What are alternatives to dacastro4/laravel-gmail for sending email in Laravel?
Alternatives include Laravel's built-in Mail system with SMTP or a transactional email provider, direct use of google/apiclient for Gmail-specific needs, Symfony Mailer, or other Gmail wrappers. Choose Laravel Mail when you need provider-agnostic email delivery, and choose this package when Gmail mailbox operations such as reading, searching, threads, labels, and attachments are central. Direct google/apiclient use may suit teams that want full control over Gmail API behavior.
Is dacastro4/laravel-gmail suitable for multi-tenant or provider-agnostic email systems?
It is best suited to Laravel applications that use Gmail as a core mailbox provider and want OAuth plus Gmail API plumbing handled by the package. It is less suitable where the product needs provider-agnostic email abstraction, strict vendor support guarantees, or heavy multi-tenant mailbox orchestration without additional internal controls. For multi-tenant use, you will likely need your own tenant isolation, token lifecycle management, quota planning, and audit logging.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager