/mailtrap-client

Mailtrap client for javascript

Primary LanguageTypeScriptMIT LicenseMIT

mailtrap-client

Build Status

Wrapper around Mailtrap api for javascript. Added polling for messages as rxjs observer.

Installation

npm add mailtrap-client

or

yarn add mailtrap-client

Package contains typescript definitions so there is no need to install extra @types package.

Usage

Example:

import {MailtrapClient} from 'mailtrap-client';
// or
// const {MailtrapClient} = require('mailtrap-client');

const client = new MailtrapClient(
    'your_api_key'
);
const messages = await client.messages.getMessages(123);

Mailtrap client contains almost same structure as mailtrap api described in docs.

Valid client properties
user
companies
inboxes
sharedInboxes
messages
corsDomains