🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

disposable-mail-api

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

disposable-mail-api

Generate multiple disposable mails

0.1.0
latest
Source
npm
Version published
Weekly downloads
4
33.33%
Maintainers
1
Weekly downloads
 
Created
Source

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!

Keywords

mail

FAQs

Package last updated on 13 Mar 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts