1.0.27 • Published 3 years ago

@maildrop/api v1.0.27

Weekly downloads
26
License
-
Repository
github
Last release
3 years ago

node-js API for maildrop.cc

helper APIs to fetch mail objects from https://maildrop.cc

install

with npm do:

npm install --save @maildrop/api

usage

for basic test

const mails = await maildrop.fetchMails("linto@maildrop.cc");
console.log(`${mails.length || "zero"} mails`);

for (const mail of mails)
  console.log(`==========\n${JSON.stringify(mail, null, 2)}\n==========`);
async fetchMails(email)

fetch mails @return Object[] like this { id, from, to, subject, date, body, html }[]

opttypedescription
emailStringrequired sample linto@maildrop.cc
{
  "id": "HrYSsdRcRA",
  "from": "Linto Cheeran <linto.cet@gmail.com>",
  "to": "linto",
  "subject": "subject",
  "date": "2020-04-08T21:47:13Z",
  "body": "raw email body",
  "html": "html body"
}
async deleteMail(email, id)

delete individual mail @return Object { deleted: true }

opttypedescription
emailStringrequired sample linto@maildrop.cc
idStringrequired individual mail object id
for (const mail of mails)
  console.log(await maildrop.deleteMail("linto@maildrop.cc", mail.id));
async getApiKey(force)

return String x-api-key, you can use this in http header

opttypedescription
forceBooleanoptional for forceful refresh
1.0.27

3 years ago

1.0.25

4 years ago

1.0.23

4 years ago

1.0.21

4 years ago

1.0.19

4 years ago

1.0.17

4 years ago

1.0.15

4 years ago

1.0.11

4 years ago

1.0.13

4 years ago

1.0.9

4 years ago

1.0.7

4 years ago

1.0.5

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago