disposable-mail-api

0.1.0 • Public • Published

Disposable Mail Api

Disposable Mail Api It is a library to generate disposable mails completly functional and usable on internet.

Installation

npm i disposable-mail-api

Examples

Basic Usage

The library is very easy to use, we can create a fully functional mail on the internet with the code shown below and we will be able to receive and consult the entire inbox.

const {DisposableMail} = require('disposable-mail-api');
const mail = new DisposableMail();

(async () => {
  const createMail = await mail.generate({mail: 'MySuperFakeEmail'}); // => {addres: 'mysuperfakeemail@kerenkey.com'}
  const getInboxMail = await mail.inbox({withHtml: true}); // => mailInbox: [{from: [{address: 'SomeEmail@SomeDomain.com', name: 'John Doe'}], intro: 'Mail content!', subject: 'important mail'}]
})();

CLI Usage

Install disposable-mail-api in global context

npm i -g disposable-mail-api

And then you can run:

disposable-mail-api -u myrandomusername --html

This will show an interface in which you can receive mails without this need of code, something like this:

Mail created => myrandomusername@karenkey.com
Listening for mails...

---------------------------- NEW MAIL ----------------------------
>> From: John Doe <JohnDoe@example.net>
>> Subject: Testing mail server.
>> Intro: Awesome mail system.
>> Body: Awesome mail system.
---------------------------- NEW MAIL ----------------------------
>> From: Not Jonh Doe <NotJohnDoe@voicemod.net>
>> Subject: Not John Doe speaking!
>> Intro: You know.... im not John Doe, im J...
>> Body: You know.... im not John Doe, im Jonh Doe!

Package Sidebar

Install

npm i disposable-mail-api

Weekly Downloads

3

Version

0.1.0

License

MIT

Unpacked Size

25.7 kB

Total Files

20

Last publish

Collaborators

  • estevesegura