This project is not covered by Drupal’s security advisory policy.

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

Project information

Releases