@mohuk/mail-helper
v1.0.0
Published
imap based mail helper functions
Downloads
10
Readme
Mail Helper
Raison d`etre
This package is made to fetch the last email arrived in the Inbox of the configured email address. It exists because we needed this to test e2e flows where email is received by the user and he takes action accordingly.
Example
import { MailHelper } from '@mohuk/mail-helper';
const helper = new MailHelper({
user: '',
password: '',
host: '',
port: '',
tls: true
});
helper.connect()
.then(() => helper.fetchLastEmail())
.then((email: string) => {
console.log(email);
})
.catch((err) => {
console.log(err)
});