PHPackages                             electricbrands/php-office365mailer - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. electricbrands/php-office365mailer

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

electricbrands/php-office365mailer
==================================

Send emails via Office365 using MS Graph API

0.4.1(3y ago)01.2k↓50%1[1 issues](https://github.com/electricbrands/PHPOffice365Mailer/issues)GPL-2.0-or-laterPHP

Since Mar 24Pushed 3y ago1 watchersCompare

[ Source](https://github.com/electricbrands/PHPOffice365Mailer)[ Packagist](https://packagist.org/packages/electricbrands/php-office365mailer)[ RSS](/packages/electricbrands-php-office365mailer/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

PHPOffice365mailer
==================

[](#phpoffice365mailer)

Send emails via Office365 using MS Graph API

Installation
------------

[](#installation)

1. Via [Composer](https://getcomposer.org/):

```
composer require electricbrands/php-office365mailer
```

2. Setup [MS Account](https://learn.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth)
3. dotenv vars:

```
MS_TENANT_ID="your tenant id"
MS_CLIENT_ID="your client id"
MS_CLIENT_SECRET="your client secret"
```

4. Make sure that the files directory is writable for the webserver

Example
-------

[](#example)

```
