ninthwalker / NowShowing

Generates an email and web page of Plex recently added content
MIT License
73 stars 8 forks source link

Office 365 Support? #32

Closed SlothCroissant closed 7 years ago

SlothCroissant commented 7 years ago

I'm trying to get this working with Office 365 email (Exchange Online). Here is Microsoft's documentation on getting SMTP running:

https://support.office.com/en-us/article/POP-and-IMAP-settings-for-Outlook-Office-365-for-business-7fc677eb-2491-4cbc-8153-8e7113525f6c?ui=en-US&rs=en-US&ad=US

When I replicate this in NowShowing (Port 587 and smtp.office365.com), I get the following error:

root@NAS01:~# docker exec nowshowing combinedreport -t
/usr/lib/ruby/2.3.0/net/smtp.rb:977:in `check_auth_response': 504 5.7.4 Unrecognized authentication type [redacted.namprd20.prod.outlook.com] (Net::SMTPAuthenticationError)
        from /usr/lib/ruby/2.3.0/net/smtp.rb:741:in `auth_plain'
        from /usr/lib/ruby/2.3.0/net/smtp.rb:733:in `authenticate'
        from /usr/lib/ruby/2.3.0/net/smtp.rb:568:in `do_start'
        from /usr/lib/ruby/2.3.0/net/smtp.rb:521:in `start'
        from /usr/lib/ruby/gems/2.3.0/gems/mail-2.6.3/lib/mail/network/delivery_methods/smtp.rb:112:in `deliver!'
        from /usr/lib/ruby/gems/2.3.0/gems/mail-2.6.3/lib/mail/message.rb:252:in `deliver!'
        from /var/lib/nowshowing/mailReport.rb:98:in `block in sendMail'
        from /var/lib/nowshowing/mailReport.rb:89:in `each'
        from /var/lib/nowshowing/mailReport.rb:89:in `sendMail'
        from /usr/local/sbin/combinedreport:386:in `main'
        from /usr/local/sbin/combinedreport:394:in `<main>'

Platform: Docker running on UnRAID 6.3.3 using latest image of NowShowing.

When I was using PlexEmail back in the day, disabling SSL was the solution for this issue, but that doesn't seem to be an option here. Any thoughts? Anything I can pull for you to help troubleshoot?

ninthwalker commented 7 years ago

I believe this is because Office365 uses the authentication type 'login'. We currently have auth type 'plain'. The smtp auth type is just how the server expects responses for logins.

we went with plain because it is pretty common. I'm not sure if gmail works with the 'login' type. We could look into possibly changing this, but if it doesn't work with gmail, then we def won't be switching as gmail is most popular.

SlothCroissant commented 7 years ago

Would be great to have the option (much like PlexEmail does), but for now I've switched over to Gmail. Thanks!

SlothCroissant commented 7 years ago

Closing issue as resolved for now, since I'm using the workaround of Gmail.