Download the PHP package maize-tech/laravel-msgraph-mailer without Composer
On this page you can find all versions of the php package maize-tech/laravel-msgraph-mailer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download maize-tech/laravel-msgraph-mailer
More information about maize-tech/laravel-msgraph-mailer
Files in maize-tech/laravel-msgraph-mailer
Package laravel-msgraph-mailer
Short Description Laravel mail transport driver for sending emails via Microsoft Graph API with OAuth2 authentication
License MIT
Homepage https://github.com/maize-tech/laravel-msgraph-mailer
Informations about the package laravel-msgraph-mailer
Laravel Microsoft Graph Mailer
A Laravel mail transport driver for sending emails via Microsoft Graph API using OAuth2 authentication.
This package provides a custom Symfony Mailer transport that integrates seamlessly with Laravel's mail system, allowing you to send emails through Microsoft 365 (formerly Office 365) using the Microsoft Graph API with application permissions (client credentials flow).
Installation
You can install the package via composer:
Configuration
Add the Microsoft Graph mailer configuration to your config/mail.php file:
Add the required environment variables to your .env file:
Usage
Once configured, you can use Laravel's Mail facade as usual. The package will automatically handle OAuth2 authentication and send emails via Microsoft Graph API.
Basic Email
Using Mailables
HTML Emails with Attachments
Token Caching Issues
Access tokens are cached for 55 minutes by default. If you need to clear the cache:
Features
- OAuth2 Authentication: Uses client credentials flow for secure authentication
- Automatic Token Caching: Access tokens are cached for 55 minutes
- Retry Logic: Automatic retry on transient failures with attempts and delays
- Full Email Support:
- HTML and plain text emails
- File attachments (including inline images)
- Multiple recipients (To, CC, BCC)
- Reply-To headers
- Laravel Integration: Works seamlessly with Laravel's Mail facade, Mailables, and Notifications
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- Enrico De Lazzari
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-msgraph-mailer with dependencies
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^11.0||^12.0
saloonphp/saloon Version ^3.14
saloonphp/cache-plugin Version ^3.0
microsoft/microsoft-graph Version ^2.53
symfony/mailer Version ^7.0||^6.0
symfony/mime Version ^7.0||^6.0
guzzlehttp/psr7 Version ^2.7