OAuth for SMTP (Microsoft Office 365/Outlook)

Hi everyone,

With Microsoft Office 365/Outlook having now retired simple user/password authentication for SMTP, I was wondering if anyone one has managed to integrate email transport with OAuth?

I am not sure where to begin :sweat_smile:

Any help would be greatly appreciated.

Kiah

Maybe it’s possible within the beforeSend() callback: Sending emails | Kirby CMS, where you have access to the PHPMailer instance. Then call $mailer->setOAuth($provider) with an instance of your OAuth provider.

At least that’s what I would try if I had to do it.

An alternative would be to use the PHPMailer class directly instead of via Kirby.