Send Email through SMTP+OAuth2 Authentication

Since OTRS 2025.9 release, OAuth2 authentication support is available for SMTP.

There will be an important upcoming change regarding email sending through Outlook 365.

See also

Microsoft has announced the planned shutdown of basic authentication for client submission (SMTP AUTH). Originally scheduled for September 2025, this change has now been postponed to March 1, 2026. Further details can be found in Microsoft’s announcement.

To ensure uninterrupted email sending, we recommend planning your transition well in advance of Microsoft’s cutoff date to avoid any disruption.

To configure the email sending:

  1. Go to the Credentials screen.

  2. Create a credential of type OAuth2::Authorization Code Flow.

    • Set Scope as offline_access https://outlook.office.com/SMTP.Send

  3. Go to the System Configuration screen.

  4. Search for the setting SendmailModule and set it to Kernel::System::Email::SMTPTLS.

  5. Search for the setting SendmailModule::Credential and add the name of the credential created in step #2.

  6. Search for the setting SendmailModule::AuthUser and add the authentication user.

  7. Search for the setting SendmailModule::Host and add smtp.office365.com.

Needed permissions in Microsoft Azure:

  1. Application permissions

    • Microsoft Graph
      • offline_access -> delegated

      • SMTP.send -> delegated

    • Office 365 Exchange Online
      • SMTP.SendAsApp

  2. User (mailbox) account permissions

    • Authenticated SMTP

Scroll to Top