# imapp

> NodeJS functional async email IMAP client

Latest version **0.1.2** (published 2021-09-30) · MIT license · 0 weekly downloads

## Install

```sh
npm install imapp
pnpm add imapp
yarn add imapp
bun add imapp
```

## Health

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

Positive: no vulnerabilities.

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

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.2 |
| Published | 2021-09-30 |
| First published | 2021-09-29 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 4.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Vidar Eldøy |
| Maintainers | eldoy |

## Links

- npm: https://www.npmjs.com/package/imapp
- Repository: https://github.com/eldoy/imapp
- Homepage: https://github.com/eldoy/imapp#readme
- Issues: https://github.com/eldoy/imapp/issues
- npm.io page: https://npm.io/package/imapp

## Dependencies (2)

- [imap](https://npm.io/package/imap.md) ^0.8.19
- [mailparser](https://npm.io/package/mailparser.md) ^3.3.1

## Recent versions

- 0.1.2 (latest) — 2021-09-30
- 0.1.1 — 2021-09-30
- 0.1.0 — 2021-09-29

## README

# Imapp

NodeJS functional async email IMAP client. Based on [node imap](https://github.com/mscdex/node-imap) and [mailparser.](https://github.com/nodemailer/mailparser)

### Install
```
npm i imapp
```

### Usage

```js
const client = require('imapp')

async function run() {
  const imap = client({
    user: 'hello@5o.no',
    password: 'tester',
    host: 'secure.mailserver.com'
  })

  // Returns an email box object
  const box = await imap.connect({ name: 'INBOX' })

  {
    name: 'INBOX',
    flags: [
      '\\Answered', '\\Flagged',
      '\\Deleted',  '\\Seen',
      '\\Draft',    '$NotJunk',
      '$Junk',      'Junk',
      'NotJunk'
    ],
    readOnly: true,
    uidvalidity: 1508591807,
    uidnext: 568,
    permFlags: [],
    keywords: [],
    newKeywords: false,
    persistentUIDs: true,
    nomodseq: false,
    messages: { total: 109, new: 0 },
    highestmodseq: '1694'
  }

  // Returns an array of matching message UIDs
  const result = await imap.search(['SEEN'])

  [ 24,  25, 129, 130, 131, 132, 133, 137 ]

  // Returns an array of parsed emails
  const messages = await imap.fetch()

  // with options
  const messages = await imap.fetch({
    query: '1:5',
    bodies: 'HEADER.FIELDS (FROM TO SUBJECT DATE)'
  })

  // Close connection
  imap.end()
}

run()
```

MIT Licensed. Enjoy!

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