Skip to content

wapacro/laravel-msgraph-mail

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Microsoft Graph Mail

This package makes it easy to send emails from your personal, work and school accounts using Microsoft's Graph API, allowing you to benefit from HTTP instead of SMTP with Laravel 7.x.

Tested with personal and company (Microsoft 365 Business) accounts

Installation

Install the package using composer:

composer require wapacro/laravel-msgraph-mail

Add the configuration to your mail.php config file:

'mailers' => [

    'microsoft-graph' => [
        'transport' => 'microsoft-graph',
        'tenant' => env('MAIL_MSGRAPH_TENANT', 'common'),
        'client' => env('MAIL_MSGRAPH_CLIENT'),
        'secret' => env('MAIL_MSGRAPH_SECRET')
    ]

    // ...

]

Getting the credentials

To get the necessary client id and secret you'll need to register your application.