File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -87,6 +87,21 @@ You can also check if you are logged in at any time:
87
87
gmail.logged_in?
88
88
end
89
89
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
+
90
105
### Counting and gathering emails
91
106
92
107
Get counts for messages in the inbox:
@@ -223,9 +238,9 @@ email either, because ruby-gmail will set it for you.
223
238
add_file "/path/to/some_image.jpg"
224
239
end
225
240
226
- Or, generate the message first and send it later
241
+ Or, compose the message first and send it later
227
242
228
- email = gmail.generate_message do
243
+ email = gmail.compose do
229
244
to "email@example.com"
230
245
subject "Having fun in Puerto Rico!"
231
246
body "Spent the day on the road..."
Original file line number Diff line number Diff line change 1
1
# TODO
2
2
3
- * Info about xoauth and plain authentication in readme
4
3
* Specs for xoauth
5
4
* Specs for message operations
6
5
* Specs for filters in mailbox
You can’t perform that action at this time.
0 commit comments