Drupal is a registered trademark of Dries Buytaert
Release: Entity API 8.x-1.8 Minor update available for module entity (8.x-1.8). Release: Module Filter 6.0.0 Major update available for module module_filter (6.0.0). Release: Blazy 3.0.19 Minor update available for module blazy (3.0.19). Release: Slick Carousel 3.0.8 Minor update available for module slick (3.0.8). Release: Blazy 3.0.18 Minor update available for module blazy (3.0.18). Release: Extra Paragraph Types (EPT): Core 2.0.1 Minor update available for module ept_core (2.0.1). Release: AI (Artificial Intelligence) 1.5.0-rc2 New release candidate for module ai (1.5.0-rc2). Release: SDC Components 1.0.10 Minor update available for module sdc_components (1.0.10). Module Revived: Content Moderation Notifications 8.x-3.9 Module content_moderation_notifications updated after 10 months of inactivity (8... Usage Milestone: Account field split Module account_field_split crossed 10,000 active installs.

This module enables sending emails through Microsoft Graph API using the
Symfony Mailer Lite module.
It provides a custom transport plugin for sending emails through Microsoft Office 365/Azure
in environments where SMTP authentication is not permitted.

Introduction

The module extends Symfony Mailer Lite to provide Microsoft Graph API integration for
sending emails. It allows you to use the official API instead of SMTP to send
emails directly through Microsoft's infrastructure while leveraging Drupal's mail system.

Requirements

  • Drupal 10.x or 11.x
  • Symfony Mailer Lite
  • Microsoft Azure account with a configured application
  • PHP 8.3 or higher
  • Composer

Installation

The recommended way to install this module is via Composer:

composer require drupal/symfony_mailer_lite_microsoft

Then enable the module either through Drupal UI or using Drush:

drush en symfony_mailer_lite_microsoft

Configuration

  1. First, set up your Microsoft Azure application:

    • Register a new application in Azure Active Directory
    • Configure the necessary permissions for Microsoft Graph API (Mail.Send)
    • Note down your Client ID, Client Secret, and Tenant ID
  2. Navigate to Configuration » System » Symfony Mailer Lite Settings in your Drupal installation
    (/admin/config/system/symfony-mailer-lite)

  3. Configure the Microsoft Graph API transport:

    • Enter your Azure application credentials
    • Configure the sender email address
    • Test the connection

Usage of DSN string

Use the following DSN string format for Microsoft Graph API transport:

microsoft-graph-api://<client_id>:<client_secret>@<tenant_id>?from=<sender_email>

Features

  • Email sending through Microsoft Graph API
  • Support for Microsoft 365 authentication
  • Integration with Symfony Mailer Lite's email templating system
  • HTML email support
  • Email testing functionality

Troubleshooting

Common issues and their solutions:

  • Authentication Failures: Ensure your Azure application credentials are correct and the application has the
    necessary permissions.
  • Email Not Sending: Verify that the sender email address is properly configured and belongs to your Microsoft 365
    organization.
  • Permission Issues: Make sure the Microsoft Graph API permissions are properly configured and admin consent is
    granted if required.

Maintainers

Current maintainers:

License

This project is licensed under GPL v2 or later.

Activity

Tracked releases
2
Tracked since
Feb 2025
Latest release
1 year ago
Releases (12 mo)
0 ▼ from 2
Maintenance
Dormant

Releases

Version Type Core Release date
1.0.0 Stable Feb 27, 2025
1.0.x-dev Dev Feb 27, 2025