Skip to content

Commit a63e4ee

Browse files
committed
info about xoauth in readme
1 parent 84458f6 commit a63e4ee

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,21 @@ You can also check if you are logged in at any time:
8787
gmail.logged_in?
8888
end
8989

90+
### XOAuth authentication
91+
92+
From v0.4.0 it's possible to authenticate to your Gmail account using XOAuth
93+
method. It's very simple:
94+
95+
gmail = Gmail.connect(:xoauth,
96+
:token => 'TOKEN',
97+
:secret => 'TOKEN_SECRET',
98+
:consumer_key => 'CONSUMER_KEY',
99+
:consumer_secret => 'CONSUMER_SECRET'
100+
)
101+
102+
For more information check out the [gmail_xoauth](https://github.com/nfo/gmail_xoauth)
103+
gem from Nicolas Fouché.
104+
90105
### Counting and gathering emails
91106

92107
Get counts for messages in the inbox:
@@ -223,9 +238,9 @@ email either, because ruby-gmail will set it for you.
223238
add_file "/path/to/some_image.jpg"
224239
end
225240

226-
Or, generate the message first and send it later
241+
Or, compose the message first and send it later
227242

228-
email = gmail.generate_message do
243+
email = gmail.compose do
229244
to "email@example.com"
230245
subject "Having fun in Puerto Rico!"
231246
body "Spent the day on the road..."

TODO.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# TODO
22

3-
* Info about xoauth and plain authentication in readme
43
* Specs for xoauth
54
* Specs for message operations
65
* Specs for filters in mailbox

0 commit comments

Comments
 (0)