Project

maildrop

0.0
No commit activity in last 3 years
No release in over 3 years
Ruby interface to MailDrop for quick, disposable mailboxes.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

>= 2.2.1, ~> 2.2
>= 2.6.4, ~> 2.6
 Project Readme

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)