Support delivery of emails using Microsoft Graph API with OAuth 2.0 client credentials flow
According to ["Basic Authentication Deprecation in Exchange Online – May 2022 Update"](https://techcommunity.microsoft.com/t5/exchange-team-blog/basic-authentication-deprecation-in-exchange-online-may-2022/ba-p/3301866) Microsoft will start turning off Basic Authentication in their worldwide multi-tenant service on October 1, 2022. However, they say
> We are not turning off SMTP AUTH. We have turned off SMTP AUTH for millions of tenants not using it, but if SMTP AUTH is enabled in your tenant, it’s because we see usage, and so we won’t touch it. We do recommend you disable it at the tenant level and re-enable it only for those user accounts that still need it.
Using SMTP AUTH with legacy auth protocol is discouraged from the security perspective https://docs.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/authenticated-client-smtp-submission
[Authenticate an SMTP connection using OAuth](https://docs.microsoft.com/en-us/exchange/client-developer/legacy-protocols/how-to-authenticate-an-imap-pop-smtp-application-by-using-oauth) is recommended, but the same, as mentioned in https://gitlab.com/gitlab-org/gitlab/-/issues/214900#note_513689268, it would require to refresh the config manually every so often.
epic