melvinsh / maildrop

Ruby interface to MailDrop for quick, disposable mailboxes.

Home Page:http://maildrop.cc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

maildrop

Gem Version Travis CI Coverage Status

Ruby interface to MailDrop. MailDrop provides free disposable e-mail addresses.

Installation

Add this line to your Gemfile:

gem 'maildrop'

Usage

Mailbox

Access a mailbox by name:

mailbox = Maildrop::Mailbox.get('example_name')

This is equal to visiting http://maildrop.cc/inbox/example_name.

You can also generate a random (12-character) name:

mailbox = Maildrop::Mailbox.random_get

Both return a Maildrop::Models::Mailbox object with the following attributes:

mailbox.name       # the name of the mailbox (String, example: example_name)
mailbox.address    # the full email address of the mailbox (String, example: example_name@maildrop.cc)

Emails

Emails can be accessed through mailbox.emails and have the following attributes:

email = mailbox.emails.first

email.sender        # sender email address (String)
email.subject       # email subject (String)
email.date          # date received (DateTime)
email.body          # email body (String, either plaintext or HTML)

About

Ruby interface to MailDrop for quick, disposable mailboxes.

http://maildrop.cc


Languages

Language:Ruby 100.0%