1.0.1 • Published 1 year ago

disp-email-util v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
1 year ago

Disposable email account

Description

This package enables you to simplify your automation test script. It provides creation of custom/random email account, access your inbox, and get content of an email.

Install

To install:

npm i disp-email-util

Usage

import { emailUtil } from "disp-email-util";

emailUtil.setEmailAccount(email).then(accountDetails => {
    // Your code here
})

emailUtil.getListOfEmails(token).then(list => {
    // Your code here
})

emailUtil.getEmailContent(token, emailId).then(content => {
    // Your code here
})

Methods/Functions

  • setEmailAccount : this creates a temporary email account. A random email user is assigned if email user is not provided, e.g. if email user is "foo", it will create an email account foo@guerrillamailblock.com
  • getListOfEmails : retrieves list of emails in your inbox. It requires token as parameter which you can get from setEmailAccount.
  • getEmailContent : get the email metadata and content. To read email content, it is recommended to use DOM parsers to process its content.

References

1.0.1

1 year ago

1.0.0

1 year ago