Gitlab SMTP Office 365 configuration on ec2 instance

Hello Folks,

I’ve tried to configure Gitlab SMTP email configuration using office 365. but I always ended up following error Net::SMTPAuthenticationError (535 5.7.139 Authentication unsuccessful, the request did not meet the criteria to be authenticated successfully. Contact your administrator. even though i’ve right credential. If anyone knows the solution kindly replay in this thread, it would be really appreciated!.

Here is my configuration:-

gitlab_rails['smtp_enable'] = true
gitlab_rails['smtp_address'] = ""
gitlab_rails['smtp_port'] = 587
gitlab_rails['smtp_user_name'] = ""
gitlab_rails['smtp_password'] = "password"
gitlab_rails['smtp_domain'] = ""
gitlab_rails['smtp_authentication'] = "login"
gitlab_rails['smtp_enable_starttls_auto'] = true
gitlab_rails['smtp_openssl_verify_mode'] = 'peer'
gitlab_rails['gitlab_email_from'] = ""