0.0.7 • Published 12 years ago

email-listener v0.0.7

Weekly downloads
27
License
-
Repository
github
Last release
12 years ago

#node.js email listener This will allow you to create a simple email receiving server that will listen for new messages and then trigger an event. You can then parse through the message of the body any way you want.

http://email-listener.nodejs.io/

Use the link above to test the app.

##installation

npm install email-listener

##usage

var emaillisten = require("email-listener");

//The optional argument will be the port to listen on
//(defaults to 25)
emaillisten.start();

//Listener Event
emaillisten.on("msg", function(recipient, rawbody, parsed){

    //Whom the message is for
    console.log(recipient);
    
    //The raw contents of the message body
    console.log(rawbody);
    
    //This is the parsed message as an object with useful and easy ways to work with the message
    console.log(parsed);
    
    
});

##parsed message

https://github.com/andris9/mailparser

This library is used to parse the message, please refer to it about what is returned in the parsed return in the callback. There will be more options to control this in future releases. For now, it just returns the parsed message with the default options.

0.0.7

12 years ago

0.0.6

12 years ago

0.0.5

12 years ago

0.0.4

12 years ago

0.0.3

12 years ago

0.0.2

12 years ago

0.0.1

12 years ago

0.0.1beta

12 years ago