GithubHelp home page GithubHelp logo

angleman / node-email-listener Goto Github PK

View Code? Open in Web Editor NEW

This project forked from djwglpuppy/node-email-listener

0.0 2.0 0.0 76 KB

This will listen for incoming emails on a server and then emit an event on success

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

License: MIT License

node-email-listener's Introduction

#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/] (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] (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.

node-email-listener's People

Contributors

djwglpuppy avatar

Watchers

James Cloos avatar  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.