New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mailtrap

Package Overview
Dependencies
Maintainers
1
Versions
42
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mailtrap

simple mailtrap.io client and library

  • 2.0.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
20K
increased by1.08%
Maintainers
1
Weekly downloads
 
Created
Source

CircleCIcodecov

mailtrap.io client

Simple mailtrap.io client and helper library

Install

npm install --save-dev mailtrap

Usage Examples

init

const client = new Client({
  apiToken: 'apiToken'
});
const inbox = new Inbox(client, 'inboxName');

wait for messages

await inbox.waitForMessages((messages) => messages.length > 2);

get messages

const messages = await inbox.getMessages();
const filteredMessages = await inbox.getMessages((m) => m.subject === 'subject');

delete messages

await inbox.deleteMessages();
await inbox.deleteMessages((m) => m.subject === 'subject');

get message body

const msgID = filteredMessages[0].id;
const txt = await client.getMessageBody(inbox.ID, msgID, 'txt');
const html = await client.getMessageBody(inbox.ID, msgID, 'html');

FAQs

Package last updated on 21 Aug 2018

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc