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:
- Register an app. A separate app registration for the website, so it is clear who sends what.
- 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.
- Create a client secret or certificate. A client secret has an expiry date. Put it where someone will see it in time.
- 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:
- Install Drupal Symfony Mailer and symfony_mailer_graphapi with Composer.
- Create a Graph transport with the tenant ID, client ID, secret and sender address, and set it as the default.
- Do not write the secret into the configuration export in Git. Store it per environment in settings.php or in environment variables.
- 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.
Checklist for the end of 2026
You should have ticked off these points before the turn of the year:
- Check mail delivery. Does your Drupal website send through smtp.office365.com with a username and password?
- List every website. Including microsites, intranets and staging environments that send emails.
- Choose a route. Graph, SMTP with OAuth or a separate delivery service.
- Involve IT. Request the app registration, Mail.Send, admin consent and the restriction to the sender mailbox.
- Store the secret safely and note its expiry date.
- Switch and test. Trigger every email type once, on staging as well.
- 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.
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.
Which Drupal module do we need for Microsoft Graph?
We use symfony_mailer_graphapi together with Drupal Symfony Mailer, in seven projects. drupal.org has further modules such as graph_mail and 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. How we look after Drupal websites in ongoing operation is described under Hosting and operations.
Go deeper in our knowledge base
Want to know what these topics mean for your company? The Future Check shows you the biggest levers within 2–4 weeks.