Cannot send emails through SMTP OFFICE365 ACCOUNT WITH APP PASSWORD

Maxime Gendre 21 Reputation points
2021-11-25T17:37:00.447+00:00

Hello,

We try to send emails from an application with an Office 365 Account.

  • The MFA is activated for all users
  • An App Password has been created for the specific user for the application
  • The application is hosted on a Virtual Machine on Azure inside a private virtual network
  • The user of the application got a "Conditional Access Policy" than unblock the legacy authentication

The configuration is the following:

gitlab_rails['smtp_enable'] = true

gitlab_rails['smtp_address'] = "smtp.office365.com"

gitlab_rails['smtp_port'] = 587

gitlab_rails['smtp_user_name'] = "******@ourdomain.ai"

gitlab_rails['smtp_password'] = "app_password"

gitlab_rails['smtp_domain'] = "ourdomain.ai"

gitlab_rails['smtp_authentication'] = "login"

gitlab_rails['smtp_enable_starttls_auto'] = true

gitlab_rails['smtp_openssl_verify_mode'] = 'peer'

gitlab_rails['gitlab_email_from'] = '******@ourdomain.ai'

It's still doesn't work:

535 5.7.139 Authentication unsuccessful, basic authentication is disabled

Note: Disable the Azure Security Defaults is not an option.

Thank you in advance for your help.

Best,

Maxime

Exchange Server Management
Exchange Server Management
Exchange Server: A family of Microsoft client/server messaging and collaboration software.Management: The act or process of organizing, handling, directing or controlling something.
7,798 questions
{count} votes

Accepted answer
  1. Andy David - MVP 152.3K Reputation points MVP
    2021-11-25T17:49:23.603+00:00
    0 comments No comments

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.