---
title: "Drupal mail via Microsoft Graph instead of SMTP"
lang: en
type: blog
canonical: https://www.arocom.de/en/blog/drupal-mail-microsoft-graph
alternate: https://www.arocom.de/blog/drupal-mails-microsoft-graph
author: "Axel Roth"
published: 2026-11-19
last_updated: 2026-11-19
---

# Drupal mail via Microsoft Graph instead of SMTP

Microsoft disables Basic Auth for SMTP AUTH in Exchange Online by default at the end of December 2026 (Message Center MC786329, updated 27 January 2026). Drupal websites that send their emails with a username and password through the Microsoft 365 SMTP server have to switch before then. The obvious route is sending through Microsoft Graph: an app registration in Microsoft Entra ID with the Mail.Send permission, OAuth sign-in, and the symfony_mailer_graphapi module in Drupal. arocom runs this module in seven Drupal projects. This post explains the change, the options and a checklist for the switch.

## Drupal mail via Microsoft Graph instead of SMTP

A visitor requests a new password, and the email never arrives. A
contact form confirms receipt, but the notification to your team never
shows up. That is what happens when a Drupal website sends its emails
over SMTP with a password through Microsoft 365 and Microsoft turns that
sign-in off. For many websites this happens at the end of December 2026.

This post explains what Microsoft is changing, how to tell whether your
website is affected and what the switch to Microsoft Graph looks like.
It ends with a checklist you can work through before the turn of the
year.

## What Microsoft is changing in Exchange Online

SMTP AUTH is the way programs hand emails to smtp.office365.com and
sign in with a username and password while doing so. That sign-in is
called Basic Auth, short for Basic Authentication. Microsoft turns off Basic Auth for SMTP AUTH in
Exchange Online by default at the end of December 2026. That is what
Message Center post MC786329 says, last updated on 27 January 2026.

The earlier date in March and April 2026 no longer applies, Microsoft
has put it on hold. From the new date, this sign-in is off unless
someone explicitly allows it again.
Microsoft plans to announce the date for the final removal in the
second half of 2027. If you switch now, you do it once and are also
ready for that second step.

## Which Drupal websites are affected

Your website is affected if all three points apply: Drupal sends
emails through an SMTP server, that server is smtp.office365.com, and
sign-in uses the username and password of a mailbox. It is a common
setup because it is quick to do: create a mailbox such as
website@your-domain.com, enter the credentials in Drupal, done.

Affected are then all emails Drupal sends itself:

- Password resets and account confirmations
- Notifications and receipts from forms
- Messages from approval workflows to the editorial team
- Order confirmations, if the website has a shop

How to check: look in Drupal at which mail delivery is set up.
Depending on the website, the SMTP server is in the settings of the
SMTP module, in a Drupal Symfony Mailer transport or in the core
mailer configuration. If it says smtp.office365.com with a username
and password, the website is affected. On the Microsoft side, the
sign-in logs in Microsoft Entra ID show which accounts sign in through
"Authenticated SMTP".

Not affected are websites that send through a separate delivery
service or connect to Exchange Online through a connector without
SMTP AUTH. Your IT should confirm this before you tick the
topic off.

## Three ways away from the SMTP password

Which way fits depends on whether emails should keep coming from a
Microsoft 365 mailbox and how much custom work you are willing to
take on.

| Route | How it works | Suits |
| --- | --- | --- |
| Microsoft Graph API | Drupal sends the email over HTTPS to Microsoft Graph and signs in via OAuth with an app from Microsoft Entra ID | Organisations whose sender should stay a Microsoft 365 mailbox. Our standard route |
| SMTP with OAuth | SMTP delivery stays, sign-in uses a token instead of a password | Cases where SMTP has to stay for other reasons. Fetching and renewing tokens is more custom work here |
| Separate delivery service | Drupal sends through a separate email service instead of Exchange Online | Websites with a lot of automated email or no link to Microsoft 365 |

For the Graph route there are several modules on drupal.org, such as
graph_mail and symfony_mailer_lite_microsoft. We use
symfony_mailer_graphapi. The module adds a Microsoft Graph transport
to Drupal Symfony Mailer. If you use the SMTP module today, you first
move mail delivery to Symfony Mailer and then choose Graph as the
transport.

## Setting up Microsoft Graph in Drupal

The switch has one part in Microsoft 365 and one in Drupal. Your IT
usually handles the first, the agency that looks after your website
the second.

In Microsoft Entra ID:

1. **Register an app.** A separate app registration for the website,
   so it is clear who sends what.
2. **Grant Mail.Send as an application permission** and give admin
   consent. Drupal sends without a signed-in user, which is why it is
   the application permission and not the delegated one.
3. **Create a client secret or certificate.** A client secret has an
   expiry date. Put it where someone will see it in time.
4. **Restrict the app to the sender mailbox.** Without this
   restriction, an app with Mail.Send can send as any mailbox in your
   organisation. In Exchange Online you can narrow this down with
   role-based access control for applications.

In Drupal:

1. Install Drupal Symfony Mailer and symfony_mailer_graphapi with
   Composer.
2. Create a Graph transport with the tenant ID, client ID, secret and
   sender address, and set it as the default.
3. Do not write the secret into the configuration export in Git.
   Store it per environment in settings.php or in environment
   variables.
4. Trigger every email type once: reset a password, submit a form,
   create a workflow notification.

Sender domain and mailbox stay the same, because the emails still
come from Exchange Online. Only the way there changes.

## What we take from seven Drupal projects

symfony_mailer_graphapi runs in seven of our Drupal projects, among
them the website of an education provider and several specialist
applications of a manufacturer. For us, sending through Graph is
routine. That makes the switch plannable: the Drupal part is known.
What you do not control alone is your IT releasing the app
registration.

This leads to the most important note for the schedule: plan the
coordination with IT early. Approving an app with Mail.Send and
restricting it to one mailbox needs someone with admin rights in
Microsoft 365, and at the end of December many of them are on
holiday.

On the side, a distinction that often gets mixed up in conversations:
email delivery and sign-in are two separate topics. In one of the
seven projects, users also sign in through Microsoft Entra ID. That
sign-in is not affected by the SMTP change and runs through its own
module. How single sign-on works with Drupal is covered in our
knowledge article
[Single sign-on with Drupal](https://www.arocom.de/en/knowledge/development/sso).

## Checklist for the end of 2026

You should have ticked off these points before the turn of the year:

1. **Check mail delivery.** Does your Drupal website send through
   smtp.office365.com with a username and password?
2. **List every website.** Including microsites, intranets and
   staging environments that send emails.
3. **Choose a route.** Graph, SMTP with OAuth or a separate delivery
   service.
4. **Involve IT.** Request the app registration, Mail.Send, admin
   consent and the restriction to the sender mailbox.
5. **Store the secret safely** and note its expiry date.
6. **Switch and test.** Trigger every email type once, on staging as
   well.
7. **Remove the old password.** Delete the SMTP credentials from
   Drupal and change the mailbox password if it only existed for the
   website.

### When does Microsoft turn off SMTP with a password in Exchange Online?

According to Message Center post MC786329, last updated on 27 January 2026, Basic Auth for SMTP AUTH is disabled by default at the end of December 2026. The earlier date in March and April 2026 is on hold. Microsoft plans to announce the date for the final removal in the second half of 2027. Microsoft describes the current timeline on the [Exchange Team Blog](https://techcommunity.microsoft.com/blog/exchange/updated-exchange-online-smtp-auth-basic-authentication-deprecation-timeline/4489835).

### Can we simply turn SMTP back on?

Basic Auth would have to be explicitly allowed again for that. That only postpones the problem until the final removal and keeps open a password sign-in that Microsoft wants to retire. Switching to Graph settles both in one step. After the switch, you can limit the app to the sender mailbox through [RBAC for Applications](https://learn.microsoft.com/en-us/exchange/permissions-exo/application-rbac).

### Which Drupal module do we need for Microsoft Graph?

We use [symfony_mailer_graphapi](https://www.drupal.org/project/symfony_mailer_graphapi) together with [Drupal Symfony Mailer](https://www.drupal.org/project/symfony_mailer), in seven projects. drupal.org has further modules such as [graph_mail](https://www.drupal.org/project/graph_mail) and [symfony_mailer_lite_microsoft](https://www.drupal.org/project/symfony_mailer_lite_microsoft). Which one fits depends on which mail delivery your website uses today.

### Does anything change about our sender addresses?

No. The emails still come from your mailbox in Exchange Online. Only the way Drupal hands over the email and signs in changes: via OAuth with an app instead of with a mailbox password.

### Does the change also affect our Microsoft sign-in?

No. User sign-in through Microsoft Entra ID is a separate topic and does not run over SMTP. Only SMTP delivery with Basic Auth is affected.

## The first step

Check this week which mail delivery is set up in your Drupal websites,
and let IT know if smtp.office365.com with a password turns up. That
takes care of the part that takes longest: the coordination.

If you would like us to handle the switch for you, write to us via
[Contact](https://www.arocom.de/en/contact). How we look after Drupal websites in ongoing
operation is described under [Hosting and operations](https://www.arocom.de/en/services/hosting).
