From c584d96360c3be97cca97bd00f1a67e0916f29e2 Mon Sep 17 00:00:00 2001 From: Thorsten Eckel Date: Sat, 5 Nov 2016 16:28:14 +0100 Subject: [PATCH] Fixed bug: Error while logging in to some IMAP services (e.g. Outlook365.) --- app/models/channel/driver/imap.rb | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/app/models/channel/driver/imap.rb b/app/models/channel/driver/imap.rb index 2ba1f3b5c..c0fc89b2e 100644 --- a/app/models/channel/driver/imap.rb +++ b/app/models/channel/driver/imap.rb @@ -68,15 +68,7 @@ returns @imap = Net::IMAP.new(options[:host], port, ssl, nil, false) end - # try LOGIN, if not - try plain - begin - @imap.authenticate('LOGIN', options[:user], options[:password]) - rescue => e - if e.to_s !~ /(unsupported\s(authenticate|authentication)\smechanism|not\ssupported)/i - raise e - end - @imap.login(options[:user], options[:password]) - end + @imap.login(options[:user], options[:password]) # select folder if !options[:folder] || options[:folder].empty?