Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Specified SASL mechanism not supported net/imap ruby

I am using ruby 1.9.3 for validating the email credentials using "net/imap" library. If I try to use the following code in rails console it works :-

imap = Net::IMAP.new('imap.aol.com')
imap.authenticate('LOGIN', "[email protected]".split("@").first, "password")

But when I use it in Rails application it gives me an error :-

Specified SASL mechanism not supported.

This happens only in case of AOL, yahoo is working in both console and rails app.

Does anyone have in insight what it could be.

Thanks

like image 631
Nishutosh Sharma Avatar asked Dec 28 '25 23:12

Nishutosh Sharma


1 Answers

I used imap.login in place of imap.authenticate. It worked like a charm.

imap.login('user', 'passwd')
like image 186
Nishutosh Sharma Avatar answered Dec 31 '25 13:12

Nishutosh Sharma