codeceptjs-mailhog-helper
v0.0.2
Published
codeceptjs-mailhog-helper is a [CodeceptJS](https://codecept.io) helper to add integrations for [MailHog](https://github.com/mailhog/MailHog).
Downloads
27
Readme
codeceptjs-mailhog-helper
codeceptjs-mailhog-helper is a CodeceptJS helper to add integrations for MailHog.
Installation
$ npm i codeceptjs-mailhog-helper --save
Configuration
codecept.conf.js
helpers: {
MailHog: {
require: 'codeceptjs-mailhog-helper',
endpoint: 'http://localhost:8025/api/v2
}
},
Options:
endpoint
: Endpoint URL of mailhog API v2 (default to 'http://localhost:8025/api/v2)
Usage
// Get latest EMail content by recipient address and subject
let content = await I.grabContentFromEmail(mailto, subject)
// get latest EMail content by recipient address, subject, body
let content = await I.grabContentFromEmail(mailto, subject, body)
// find URL string from latest EMail content
let url = await I.grabUrlFromEmail(mailto, subject)
let url = await I.grabUrlFromEmail(mailto, subject, body)