This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
TYPO3 extension (ok_exchange365_mailer) that enables sending emails via Microsoft Exchange 365 using the MS Graph API instead of SMTP. Uses OAuth 2.0 client credentials flow for authentication.
Compatibility: TYPO3 12.4 - 14.x | PHP 8.3
-
Classes/Mail/Transport/Exchange365Transport.php- Custom Symfony mailer transport implementingAbstractTransport. Handles OAuth2 authentication and sends emails via MS Graph API. Note: Excluded from autowiring in Services.yaml as TYPO3 instantiates it directly. -
Classes/Lowlevel/EventListener/ModifyBlindedConfigurationOptionsEventListener.php- Event listener that blinds sensitive credentials (tenantId, clientId, clientSecret) in TYPO3's configuration module.
- TypoScript (frontend context only):
plugin.tx_okexchange365mailer.settings.exchange365.* - TYPO3 Mail Settings:
$GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_exchange365_*']
| Setting | TypoScript Key | Mail Setting Key |
|---|---|---|
| Tenant ID | tenantId |
transport_exchange365_tenantId |
| Client ID | clientId |
transport_exchange365_clientId |
| Client Secret | clientSecret |
transport_exchange365_clientSecret |
| From Email | fromEmail |
transport_exchange365_fromEmail |
| Save to Sent | saveToSentItems |
transport_exchange365_saveToSentItems |
- Sender display name: The Graph API uses the Display name configured on the mailbox in Exchange Online. TYPO3's
$GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName']anddefaultMailFromAddresshave no effect on the sender name shown to recipients. The display name must be configured in the Microsoft 365 Admin Center or Exchange Admin Center.
microsoft/microsoft-graph^2 - MS Graph API SDKoliverkroener/ok-typo3-helper^4 - ProvidesMSGraphMailApiServicefor message conversion