# mail.tm

> A npm package that utilizes mail.tm's API into a much more friendlier integration

Latest version **0.0.5** (published 2021-09-09) · ISC license · 0 weekly downloads

## Install

```sh
npm install mail.tm
pnpm add mail.tm
yarn add mail.tm
bun add mail.tm
```

## 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.0.5 |
| Published | 2021-09-09 |
| First published | 2021-08-31 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 12.9 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Maintainers | apollyon365 |

## Links

- npm: https://www.npmjs.com/package/mail.tm
- npm.io page: https://npm.io/package/mail.tm

## Dependencies (1)

- [request](https://npm.io/package/request.md) ^2.88.2

## Recent versions

- 0.0.5 (latest) — 2021-09-09
- 0.0.4 — 2021-09-09
- 0.0.3 — 2021-09-01
- 0.0.2 — 2021-08-31
- 0.0.1 — 2021-08-31

## README

<h2 align="center">mail.tm</h2>
<p align="center">A npm package that utilizes mail.tm's API into a much more friendlier integration</p>

---
# ➤ Installation
 
```
npm install mail.tm
``` 

---
# ➤ Getting Started

#### NOTE: Each method is async/await 
This is to create separate instances for each mail account to login to.
### Example without any additional extensions:
```js
const MailClient = require("mail.tm");
const mail = new MailClient();
```

### Example with additional extensions:
```js
const MailClient = require("mail.tm");
const mail = new MailClient("mail.tm", "apollo30.xyz");
```
---
# ➤ Registering an account

### Registering an account with a specific domain that is integrated to mail.tm
```js
const MailClient = require("mail.tm");
const mail = new MailClient();
await mail.register("apollo30@mail.tm", "qwerty123");
// { status: true, data: {...} }
```
---
# ➤ Generating a random account
### Generate an account with a random extension
```js
const MailClient = require("mail.tm");
const mail = new MailClient();
await mail.generateAccount();
// { status: true, data: { username: "324j5n@mail.tm", password: "58u35h3xzpv" } }
// { status: true, data: { username: "3whi58@apollo30.xyz", password: "35gasfyhdas" } }
```

### Generate an account with a specific extension
```js
const MailClient = require("mail.tm");
const mail = new MailClient();
await mail.generateAccount("mail.tm");
// { status: true, data: { username: "23ygsa@mail.tm", password: "awt335shruji" } }
```
---

# ➤ Account Utilities

### Login to an account
```js
const MailClient = require("mail.tm");
const mail = new MailClient();
await mail.login("apollo30@mail.tm", "qwerty123");
// { status: true, data: {...} }
```

### Fetch the logged in account 
```js
const MailClient = require("mail.tm");
const mail = new MailClient();
await mail.fetch();
// { status: true, data: {...} }
```

### Delete the logged in account
```js
const MailClient = require("mail.tm");
const mail = new MailClient();
await mail.delete("1234567890");
// { status: true, data: {...} }
```

### Fetch messages sent to the email
```js
const MailClient = require("mail.tm");
const mail = new MailClient();
await mail.fetchMessages(1);
// { status: true, data: {...} }
```
---

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