PHPackages                             agabaandre-office365/exchange-email-service - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. agabaandre-office365/exchange-email-service

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

agabaandre-office365/exchange-email-service
===========================================

General-purpose email service using Microsoft Graph API with OAuth 2.0 authentication. Requires https://graph.microsoft.com/Mail.Send permission.

1.1.3(7mo ago)019MITPHPPHP &gt;=7.4

Since Oct 1Pushed 7mo agoCompare

[ Source](https://github.com/agabaandre/exchange_email_service)[ Packagist](https://packagist.org/packages/agabaandre-office365/exchange-email-service)[ Docs](https://github.com/agabaandre/exchange_email_service)[ GitHub Sponsors](https://github.com/sponsors/agabaandre)[ RSS](/packages/agabaandre-office365-exchange-email-service/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (6)Versions (5)Used By (0)

Exchange Email Service
======================

[](#exchange-email-service)

[![Latest Version](https://camo.githubusercontent.com/7f2b542b05082878d124b30691d5b2bc14edc835415e51aa5028684033d720b1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6167616261616e6472652d6f66666963653336352f65786368616e67652d656d61696c2d736572766963652e737667)](https://packagist.org/packages/agabaandre-office365/exchange-email-service)[![License](https://camo.githubusercontent.com/940b60d0b916bf8069439447420bc7bdd80ddafa76fc9b7e935c5b6b0f0f3be2/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6167616261616e6472652d6f66666963653336352f65786368616e67652d656d61696c2d736572766963652e737667)](https://packagist.org/packages/agabaandre-office365/exchange-email-service)[![PHP Version](https://camo.githubusercontent.com/0c6c5afab6b74cbbaa485d9f305bbfdc804379b209090aec32df279ef586e86e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6167616261616e6472652d6f66666963653336352f65786368616e67652d656d61696c2d736572766963652e737667)](https://packagist.org/packages/agabaandre-office365/exchange-email-service)[![Total Downloads](https://camo.githubusercontent.com/c816f9c6c65ecd6db3ae1661d65d379d2329d2190fb8c200fb1276fa489bcf06/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6167616261616e6472652d6f66666963653336352f65786368616e67652d656d61696c2d736572766963652e737667)](https://packagist.org/packages/agabaandre-office365/exchange-email-service)

A powerful, framework-agnostic PHP package for sending emails via Microsoft Graph API with OAuth 2.0 authentication. Works seamlessly with Laravel, CodeIgniter, Yii, and vanilla PHP projects.

✨ Features
----------

[](#-features)

- 🚀 **Microsoft Graph API** - Most reliable email delivery method with "Send mail as any user" capability
- 🔐 **OAuth 2.0 Security** - No password storage required
- 🔄 **Automatic Token Refresh** - Seamless token management
- 🏗️ **Framework Agnostic** - Works with any PHP framework
- 📧 **Rich Email Support** - HTML, text, templates, attachments
- 🎯 **Laravel Integration** - Service provider with auto-discovery
- 📁 **File-based Storage** - No database required for tokens
- 🛠️ **Easy Configuration** - Simple setup with environment variables
- 🐛 **Debug Mode** - Comprehensive logging and error handling
- 📦 **Production Ready** - Tested and optimized for production use

📦 Installation
--------------

[](#-installation)

### Via Composer

[](#via-composer)

```
composer require agabaandre-office365/exchange-email-service
```

### Manual Installation

[](#manual-installation)

1. Download the package
2. Extract to your project directory
3. Run `composer install`

🚀 Quick Start
-------------

[](#-quick-start)

### Vanilla PHP

[](#vanilla-php)

```
