Office 365 Email Notification Settings

Added by Alex Wade almost 8 years ago

Hi all,

I've tried just about every combination of email settings to authenticate with Office 365 and have had no luck. Has anybody else been able to get it to work? I get "Unrecognized Authentication Type" when sending a test email.

Here's one of my latest attempts:

default:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      #tls: true
      enable_starttls_auto: false
      openssl_verify_mode: none
      address: "smtp.office365.com" 
      port: 587
      domain: "smtp.office365.com" 
      authentication: plain
      user_name: "redmine@mycompany.com" 
      password: "thepassword" 

Server EHLO response below.

250-XXXX.outlook.office365.com Hello [X.X.X.X]
250-SIZE 36700160
250-PIPELINING
250-DSN
250-ENHANCEDSTATUSCODES
250-STARTTLS
250-AUTH
250-8BITMIME
250-BINARYMIME
250 CHUNKING

Replies (9)

RE: Office 365 Email Notification Settings - Added by Bonnie O almost 8 years ago

The settings below worked for me.

production:
email_delivery:
smtp_settings:
address: smtp.office365.com
port: 587
domain: smtp.office365.com
authentication: :login
user_name:
password: mypassword
enable_starttls_auto: true

RE: Office 365 Email Notification Settings - Added by Pedro Melo about 6 years ago

These setting worked for me too, thanks a lot!

RE: Office 365 Email Notification Settings - Added by Bernhard Schulz 12 months ago

I can confirm, that today (July 2020) the settings from Bonnie O from 2013 are still working.

RE: Office 365 Email Notification Settings - Added by Celso Acurcio 8 months ago

I can't for the life of me make this work.
No matter what options I select I always get an error, I think that the closest setting I can get I still get an authentication error:

An error occurred while sending mail (535 5.7.3 Authentication unsuccessful [LO2P123CA0098.GBRP123.PROD.OUTLOOK.COM] )

I tried many different options and followed many different online forums and instructions but none work, I'm starting to wonder if this is due to the 2FA on my account and if there's a way to go around it somehow.
My settings are as follows:

production:
email_delivery:
delivery_method: :smtp
smtp_settings:
address: smtp.office365.com
port: 587
domain: smtp.office365.com
authentication: :login
user_name:
password: mypass
enable_starttls_auto: true
openssl_verify_mode: none

Please help.

RE: Office 365 Email Notification Settings - Added by orfeas manousiadis 8 months ago

Hi

It work fine by me

Thanks

RE: Office 365 Email Notification Settings - Added by Celso Acurcio 8 months ago

Just trying to get help again here, this is still not ok for me.
I've tried with and without quotation marks in everything, disabled the 2FA in this account and it's still unsuccessful.
Is there any other factor that may be causing this?
I have the exact same spacing as Bonnie O and lines (with the exception of username and pass).
Is there any way I can try to establish the connection manually to see in which step it fails? something that provides a more detailed fault information?

My gmail configuration works perfectly fine with the official redmine instructions, why is office365 not working with those?

RE: Office 365 Email Notification Settings - Added by Sebastian Bilda 4 months ago

Hi,

i have the same problem here and it still not working.
I have tried the configurations that are mentioned above and also activated the external SMTP access for the specific account. Also configured the action_mailer.perform_deliveries to true.

The message that i get is always "execution expired". No authentication error or something else.

Did i miss something? Should be 2FA disabled?

RE: Office 365 Email Notification Settings - Added by Celso Acurcio 4 months ago

Yes, I have fought with this issue as well and it's now solved.
Create a dedicated email just for this so you can disable 2FA and follow the links I provided so that this email allows access from "unsafe applications" and it will work.
It's better that you limit this account for redmine only as you will disable all safety features basically.

(1-9/9)