Skip to content

nmummau/mailslurp-client

 
 

Repository files navigation

MailSlurp is an Email API for developers and QA testers. It let's users create emails addresses on demand, then send and receive emails and attachments in applications and tests. MailSlurp is free for personal use.

Features ✉️ → 📭 → 📨

  • Create dynamic email accounts
  • Receive emails with waitFor(condition) long-polling
  • Receive emails using Push WebHooks
  • Send templated, transactional emails

About

This project contains the official and recommend MailSlurp SDK Client for Node, Javascript, and Typescript. All MailSlurp requests require API Authentication. Obtain a free API Key for personal use.

Getting Started

Resources
📦 NPM Module
📖 Documentation
✍️ Examples
🎓 Developer Portal
🔑 Get API Key
⚠️ Report an issue

Examples

npm install --save mailslurp-client
// instantiate client
const MailSlurp = require('mailslurp-client').default;
const mailslurp = new MailSlurp({ apiKey: 'XXXXX' });

// create a new email address
const { emailAddress, id } = await mailslurp.createInbox();

// receive email using created inbox
const { subject, body } = await mailslurp.waitForLatestEmail(id);

// send email from inbox
await mailslurp.sendEmail(id, { to: ['xxxx@gmail.com'] })

// SEE DOCUMENTATION FOR ALL METHODS

Documentation

This repository contains documentation for all methods. The client closely resembles the REST API. The REST API has detailed documentation at docs.mailslurp.com.

Other Clients

You can find more MailSlurp SDKs on our website. If you wish to call the REST API directly please see the HTTP Documentation.

Change Log

See CHANGELOG.md.

Issues

Please email support and include a sample of the code you are using. Alternatively you can start a chat with our developers (note: responses may be asynchronous).

License

MIT

About

Official MailSlurp Client

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • TypeScript 97.9%
  • JavaScript 1.1%
  • Makefile 1.0%