# email-listener

> Listen for email messages on a server and then trigger an event

Latest version **0.0.7** (published 2012-06-04) · 0 weekly downloads

## Install

```sh
npm install email-listener
pnpm add email-listener
yarn add email-listener
bun add email-listener
```

## Health

**Score 10/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; low quality score; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.7 |
| Published | 2012-06-04 |
| First published | 2012-06-02 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Node | * |
| Dependencies | 2 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 26 |
| Author | David K Roberts |
| Maintainers | djwglpuppy |
| Keywords | smtp, email |

## Links

- npm: https://www.npmjs.com/package/email-listener
- Repository: https://github.com/djwglpuppy/node-email-listener
- Issues: https://github.com/djwglpuppy/node-email-listener/issues
- npm.io page: https://npm.io/package/email-listener

## Dependencies (2)

- [mailparser](https://npm.io/package/mailparser.md) >=0.0.1
- [underscore](https://npm.io/package/underscore.md) >=0.0.1

## Alternatives

- [@expo/fingerprint](https://npm.io/package/@expo/fingerprint.md) — 6.2M weekly downloads
- [@azure/monitor-opentelemetry-exporter](https://npm.io/package/@azure/monitor-opentelemetry-exporter.md) — 850.0K weekly downloads
- [@azure/monitor-opentelemetry](https://npm.io/package/@azure/monitor-opentelemetry.md) — 624.0K weekly downloads
- [@posthog/ai](https://npm.io/package/@posthog/ai.md) — 423.3K weekly downloads
- [fakefilter](https://npm.io/package/fakefilter.md) — 63.9K weekly downloads

## Recent versions

- 0.0.7 (latest) — 2012-06-04
- 0.0.6 — 2012-06-04
- 0.0.5 — 2012-06-03
- 0.0.4 — 2012-06-03
- 0.0.3 — 2012-06-02
- 0.0.2 — 2012-06-02
- 0.0.1 — 2012-06-02
- 0.0.1beta — 2012-06-02

## README

#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


```javascript
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.

---
_Source: https://npm.io/package/email-listener · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
