Download the PHP package kashi326/office365-mail without Composer
On this page you can find all versions of the php package kashi326/office365-mail. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kashi326/office365-mail
More information about kashi326/office365-mail
Files in kashi326/office365-mail
Package office365-mail
Short Description Office365 transport for Laravel
License MIT
Informations about the package office365-mail
Laravel Microsoft Graph Mail driver - Mail Driver for Office365
Mail driver for the Laravel framework to send emails using Microsoft Graph without user authentication and SMTP. Only specify the E-Mail-Address in the FROM-Header of the E-Mail and this Office 365 Package will send the E-Mail trough the Microsoft Graph-Api and put the sent E-Mail in the sender's Mailbox sent folder.
Key features:
- Send E-Mails with the Microsoft Graph-Api instead of the SMTP driver
- Automatically puts the E-Mail in the Sent folder of the user in the From-Header
- One Application per Organization
- Supports multiple Domains
- Supports large file attachments
- Faster and Error-less than the Office-365 SMTP
To use this package you have to register your application here. More informations here.
Install the Package
You can install the package with Composer, either run composer require motze92/office365-mail
, or edit your composer.json
file:
Laravel 9
For Laravel 9 please use
Laravel 8
For Laravel 8 please use
Laravel < 7
For Laravel 6 and earlier please use
To publish the config file use this command:
Configure
To obtain needed config values use this instructions:
- Open the Azure Active Directory-Portal) with your Office365 Admin-User
- Open the Section Manage > App-Registrations
- Create a new App
- Within the App under
Manage
>API-Permissions
>Application Permissions
add theMail.ReadWrite
and theMail.Send
permission (Microsoft Graph > Application Permissions > Mail > Mail.ReadWrite and Microsoft Graph > Application Permissions > Mail > Mail.Send) - After saving the permission apply the Admin-Permission for your organization
- In the Section Manage > Certificates and Secrets create a new Client Secret with Expiration = 24 months, this you need later for the
.env
- VariableOFFICE365MAIL_CLIENT_SECRET
The Mail.ReadWrite
Permission is needed when sending large attachments (>4MB).
.env - File
Laravel < 7
Laravel > 7
config/mail.php - add to mailer configuration array (https://github.com/laravel/laravel/blob/7.x/config/mail.php)
Credits
Moritz Mair, Matthias Radmüller, Merlin Mayr
Copyright and license
Copyright (c) Moritz Mair. All Rights Reserved. Licensed under the MIT license.