disp-email-util
v1.0.1
Published
Disposable email utilities for automation testing
Downloads
5
Maintainers
Readme
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 [email protected]
- 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.