Search code examples
ruby-on-railsrubygemsruby-on-rails-3.2gmail-imap

Gmail imap, smtp with oauth 2.0 in rails


I am new to ROR. Just finished learn by examples by Michael Hurtle.

I think the best way to learn a new language is to develop something out of it.

So, I want to port my Asp.net app in ROR.

My app uses a gmail's imap/stmp to send/receive emails. I use XOAUTH 2.0 for authentication.

I googled for the same in ROR and found gmail gem. It has great features but it does not support 2.0. It supports until 1.0.

I am newbie and cannot change this gem to support 2.0

Can somebody provide a blog link / gem so that I can use gmail smtp/imap in rails with XOAUTH 2.0 ?


Solution

  • I am using gmail_xoauth gem.

    It looks promising. My thought that it doesnt have any docs was wrong.

    It uses the Net::SMTP library of ruby to send emails. ( I am new to ROR , so wasnt aware of this)

    I am able to send an email successfully by using just my email and access_token i.e. XOAUTH2