guerrillamail

0.0.7 • Public • Published

guerrillamail

Simple wrapper for Guerrillamail.com API written in CoffeeScript

Works in Node.js making port for browser down the road

Example:

{Guerrillamail} = require './Guerrillamail'

# Uses mikeal/request for HTTP Requests
# Set defaults as the second argument

request_defaults = {  }

# Can use a custom username, however must not already be in use or it will default to a random one
username = 'this-is-a-test-user'

# Create our mailbox
mailbox = new Guerrillamail#username, request_defaults

# This event fires whenever the email address has been registered on the site
mailbox.on 'email_addr', (email_address) =>
	console.log "send mail to '" + email_address + "'"

# This event fires everytime a message comes in
mailbox.on 'message', (envelope) =>
	console.log envelope.message

# Filters can be set on all of the 'mail_' fields
mailbox.on 'from:filter-can-be-set-here@example.com', (envelope) =>
	console.log envelope.message

Readme

Keywords

none

Package Sidebar

Install

npm i guerrillamail

Weekly Downloads

8

Version

0.0.7

License

none

Last publish

Collaborators

  • znetstar