Support OAuth / Microsoft Graph API for email sending

We use Anvil to send transactional emails via SMTP through a Microsoft 365 mailbox. Microsoft (and Google) are actively deprecating basic SMTP AUTH in favour of OAuth 2.0, and security frameworks like the CIS Microsoft 365 Foundations Benchmark now mandate blocking legacy authentication across the tenant — which includes SMTP AUTH.

Feature request

Could Anvil support OAuth / Graph API as an option for sending email, alongside the existing SMTP AUTH method? This would allow organisations on Microsoft 365 (and Google Workspace, which has similar legacy auth deprecation) to send email without needing to punch holes in their security controls.

For Microsoft 365 specifically, this would mean supporting Microsoft Graph API mail sending (POST /users/{id}/sendMail with OAuth token)

Happy to provide more technical detail if useful.

1 Like