0.0.7 • Published 10 years ago

guerrillamail v0.0.7

Weekly downloads
22
License
-
Repository
-
Last release
10 years ago

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
0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.2

10 years ago

0.0.1

10 years ago