---
title: "Configuration"
manual: "Microsoft Exchange 365 Mailer"
version: "main"
permalink: "https://docs.typo3.org/permalink/oliverkroener/ok-exchange365-mailer:configuration@main"
source: "Configuration/Index.rst"
rendered: "2026-10-04T20:03:13+00:00"
---

# Configuration {#configuration}

This section covers all aspects of configuring the Microsoft Exchange 365 Mailer extension for TYPO3.

After completing the [Azure Configuration](https://docs.typo3.org/permalink/oliverkroener/ok-exchange365-mailer:azure@main), you need to configure the TYPO3 extension with the values obtained from Microsoft Entra ID.

-   [Essential](https://docs.typo3.org/permalink/oliverkroener/ok-exchange365-mailer:essential-configuration@main)
-   [Site Sets](https://docs.typo3.org/permalink/oliverkroener/ok-exchange365-mailer:site-set-configuration@main)
-   [Frontend](https://docs.typo3.org/permalink/oliverkroener/ok-exchange365-mailer:frontend-configuration@main)

## Quick Configuration Overview {#quick-configuration-overview}

The extension requires the following key configuration variables:

1.  **Mail Transport**: Set to use Exchange365Transport
1.  **Tenant ID**: Your Microsoft Entra ID tenant identifier
1.  **Client ID**: Your Azure application identifier
1.  **Client Secret**: Your Azure application secret
1.  **From Email**: The sender email address
1.  **Graph Sender User ID** *(optional)*: Mailbox used for the Microsoft Graph
    `/users/{id}/sendMail` call. Decouples the Graph mailbox from the
    visible `From` header for *Send As* / *Send On Behalf* scenarios.
1.  **Save to Sent Items**: Whether to save emails to sent folder

For detailed step-by-step instructions, see:

-   [Essential Configuration](https://docs.typo3.org/permalink/oliverkroener/ok-exchange365-mailer:essential@main) \- For server-side email sending (recommended for production)
-   [Site Set Configuration](https://docs.typo3.org/permalink/oliverkroener/ok-exchange365-mailer:sitesets@main) \- For frontend email sending on TYPO3 v13 and v14
-   [Frontend Configuration](https://docs.typo3.org/permalink/oliverkroener/ok-exchange365-mailer:frontend@main) \- The TypoScript constants, required on TYPO3 v12

## Configuration Methods {#configuration-methods}

You can configure this extension using:

-   ****Essential Configuration** (Recommended)**

    -   `$GLOBALS['TYPO3_CONF_VARS']['MAIL']`, filled from environment variables
    -   Applies to backend, CLI, scheduler and frontend

-   ****Site Set** (TYPO3 v13 and v14, for Forms)**

    -   Activated per site, edited in **Site Management > Sites**
    -   The modern replacement for the static TypoScript template

-   ****Frontend Configuration** (TypoScript, all versions)**

    -   Optional per-site overrides via the static template
    -   Read secrets with `:= getEnv(...)` — never write them into TypoScript

Choose the method that best fits your deployment workflow and security requirements.

## Configuration Precedence {#configuration-precedence}

The two sources are merged **per setting**, not all-or-nothing:

1.  The global mail settings (`$GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_exchange365_*']`)
    are the baseline and apply in every context — frontend, backend, command line and
    scheduler.
1.  In the **frontend**, any non-empty value from the site set or from TypoScript
    overrides the corresponding mail setting. Values left empty fall through to the
    baseline.

This lets you keep the credentials in environment variables while still adjusting, for
example, `fromEmail` per site in the backend.

> [!WARNING]
> **Attention**
>
> **Security Recommendation**: Use backend configuration with environment variables for production environments to avoid exposing sensitive Azure credentials in TypoScript or in `config/sites/<identifier>/settings.yaml`.
