Socket
Book a DemoInstallSign in
Socket

mail-xoauth

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mail-xoauth

0.1.0
bundlerRubygems
Version published
Maintainers
1
Created
Source

Mail::Xoauth

Make the Mail work with Gmail using OAuth. This project is build on top of gmail_xaouth. Mail::Xoauth simply makes provides a nice connect to mail's rich delivery and retrevial interface.

Installation

Add this line to your application's Gemfile:

gem 'mail-xoauth'

And then execute:

$ bundle

Or install it yourself as:

$ gem install mail-xoauth

Usage

This gem does not retreive oauth access or refresh tokesn for you! You must retrieve them yourself. Mail::Xoauth requires an access token. It's up to you to ensure a valid access token using a refresh token. If you do not know how to do that, then look at the tests. There is an example class to handle this. Given a valid oauth access token and email address you're ready to connect.

Getting Email

gmail = Mail::XOauthIMAP.new address: 'example@gmail.com', access_token: 'foo'

# Query using Mail's standard interface
gmail.all

Sending Mail

email = Mail.new do
  from 'example@gmail.com'
  to 'example@example.com'
  subject 'XOauth Test'
end

gmail = Mail::XOauthSMTP.new address: 'example@example.com', access_token: 'foo'
gmail.deliver! email

Contributing

  • Fork it
  • Create your feature branch (git checkout -b my-new-feature)
  • Commit your changes (git commit -am 'Add some feature')
  • Push to the branch (git push origin my-new-feature)
  • Create new Pull Request

FAQs

Package last updated on 25 Jul 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.