Office 365 SMTP OAuth2
No security coverage
Sends emails via Office 365 / Microsoft 365 using OAuth2 authentication. This module provides a complete solution for sending emails from your Drupal site through Office 365's SMTP servers without needing to store credentials in plain text.
Features
- OAuth2 Authentication: Secure authentication using Microsoft OAuth2 (no plain text passwords)
- Automatic Token Refresh: Tokens are automatically refreshed before expiration
- File Attachments: Full support for sending emails with file attachments (MIME multipart)
- Entity Configuration: Settings managed via Drupal's configuration system
- Test Form: Built-in form to test email sending
Requirements
- A Microsoft Entra ID (Azure AD) application registered in the Azure portal
- The application must have Mail.Send permission for Microsoft Graph API
- A client secret or X.509 certificate configured in Azure AD
- PHP 8.1+ with OpenSSL extension
- Drupal 10 or 11
Installation
Using Composer (Recommended)
composer require seydou91/o365_smtp
Depends on
Dependencies of the latest stable release
No dependencies recorded for this project.
Required by
Tracked projects that depend on this one
No tracked projects depend on this one yet.
Activity
Releases
| Version | Type | Core | Notes | Release date | |
|---|---|---|---|---|---|
| 2.0.x-dev | Dev | 10–11 | Sep 10, 2026 |