gmail

https://github.com/gmailgem/gmail

Ruby

A Rubyesque interface to Gmail, with all the tools you'll need.

Gmail.connect

Creates new Gmail connection using given authorization options.

==== Examples

  Gmail.new(:plain, "[email protected]", "password")
  Gmail.new(:xoauth, "[email protected]",
    :consumer_key => "",
    :consumer_secret => "",
    :token => "",
    :secret => "")

To use plain authentication mehod you can also call:

  Gmail.new("[email protected]", "password")

You can also use block-style call:

  Gmail.new("[email protected]", "password") do |client|
    # ...
  end

Source | Google | Stack overflow

Edit

git clone [email protected]:gmailgem/gmail.git

cd gmail

open lib/gmail.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Gmail-connect-for-pr


# Commit to git

git add lib/gmail.rbgit commit -m "better docs for Gmail.connect"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Gmail-connect-for-pr

hub pull-request


# Celebrate!