simonrob / email-oauth2-proxy

An IMAP/POP/SMTP proxy that transparently adds OAuth 2.0 authentication for email clients that don't support this method.
Apache License 2.0
797 stars 86 forks source link

SmtpClientAuthentication is disabled for the Tenant #193

Closed bemoody closed 1 year ago

bemoody commented 1 year ago

When trying to send mail to smtp.office365.com, I get the error message:

535 5.7.139 Authentication unsuccessful, SmtpClientAuthentication is disabled for the Tenant. Visit https://aka.ms/smtp_auth_disabled for more information. [MN2PR05CA0004.namprd05.prod.outlook.com 2023-09-12T20:59:57.214Z 08DBB276B7E699C4]

Said page claims: "Virtually all modern email clients that connect to Exchange Online mailboxes in Office 365 or Microsoft 365 (for example, Outlook, Outlook on the web, iOS Mail, Outlook for iOS and Android, etc.) don't use SMTP AUTH to send email messages."

Does anybody have a clue what "virtually all modern email clients" do instead, if they don't use SMTP?

simonrob commented 1 year ago

Microsoft tries to disguise the fact that SMTP is supported through opaque error messages and pages like that. See: https://learn.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/authenticated-client-smtp-submission

Edit: I didn't actually follow your link, but it turns out to go to the same page. See the instructions at the bottom to enable SMTP for your account/organisation.