gmailgem / gmail

A Rubyesque interface to Gmail, with all the tools you'll need.
Other
397 stars 119 forks source link

Unable to extract the emails which are received in last 5 minutes #257

Closed bishal52 closed 4 years ago

bishal52 commented 6 years ago

I wanted to extract the emails which are received in last 5 minutes using gmail gem.

 Gmail.connect(email, password) do |gmail|                                                                   
   p gmail.inbox.find(:after => Time.zone.now - 5.minutes).count
 end

But its giving all the emails which are received today.

johnnyshields commented 4 years ago

As of version 0.7.0 (Aug 19, 2018) this gem is officially deprecated and will no longer be maintained. Please instead use Google's official Gmail API Ruby Client, which uses the Gmail API rather than IMAP and has significantly better performance and reliability.