GithubHelp home page GithubHelp logo

py-mailinator's Introduction

py-mailinator

Build Status PyPI version Code Health Coverage Status

An python wrapper for the mailinator.com api

##Installation

Install using pip

pip install py-mailinator

##Commands

Retrieve Inbox Get your api key at the mailinator settings page.

from pymailinator.wrapper import Inbox

inbox = Inbox(api_key)
inbox.get()
print inbox.messages

##Check Mail

mail = inbox.messages[0]
mail.get_message()
print mail.body

##Inbox Object Methods:

  • get() : retrieves inbox
  • count(): run after get, gets length of inbox
  • view_subjects(): run after get. Gets lists of subject lines of inbox
  • view_message_ids(): run after get. Gets lists of subject lines of inbox
  • get_message_by_subject(subject): takes a subject as a string, returns message or list of messages with that subject
  • get_message_by_id(id): takes an message id as a string, returns the message if it exists
  • filter(field, value): returns list of message objects where message.field == value

##Message Object Methods:

  • get_message(): retrieves full message body and headers

Attributes:

  • id : message id
  • subject : message subject line
  • time : message delivery time
  • seconds_ago : number of seconds between time of delivery and time of request
  • origfrom : Original from field
  • ip : ip address the email was sent from
  • been_read : boolean if messsage has been opened
  • headers : only available after get_message(), shows the message headers
  • body : only available after get_message(), shows message body

py-mailinator's People

Contributors

mc706 avatar senadi avatar motatoes avatar maxisoft avatar

Watchers

RS19Hack avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.