SendGmail

send_gmail handles gmail.
now it features only the acquisition of e-mail. this gem is using gmail api.
https://developers.google.com/gmail/api/

Feature

  • mail sending
  • create draft
  • on/off label
  • other...

Installation

Add this line to your application's Gemfile:

gem 'send_gmail'

And then execute:

$ bundle

Or install it yourself as:

$ gem install send_gmail

To begin with

$ client = SendGmail::Client.new
$ client.authorize(credentials_path, client_id, client_secret, scope)

Incoming mail

$ mail_id_list = client.mail_id_list(searching_option)
  => {
   :mail_id_list=>["ffffff", "ccccc", ...],
   :next_page_token=>"123456789"
   }

$ mail_id_list[:mail_id_list].map { |mail_id| client.mail_detail(mail_id) }
  => [#<SendGmail::Objects::Mail... , ...]
$ mail_list = client.mail_list(searching_option)
  => {
   :mail_id_list => [#<SendGmail::Objects::Mail... , ...],
   :next_page_token => "123456789"
   }

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/hatappi/send_gmail.

License

The gem is available as open source under the terms of the MIT License.