As an automation tester, I want to receive mail from yopmail system. So I can do some feature needed to get information from mail inbox details such as register account or forgot password in an application.
Installation
To receive mail in typescript, I will use the yopmail-helper package. To install that package, I use this command:
npm i yopmail-helper
Example link
How to use
//Declare module
import { inbox, linkOfFirstMail, mailDetails, mailDetailsHtml } from 'yopmail-helper';
✉️ get inbox of a mail address
const mails = await inbox('admin01');
🗃️ Read details of an email
const mails = await inbox('admin01');
const mailDetailsInfo = await mailDetails(mails[0].mailId,'admin01');
🗃️ Read details of an email in HTML
const mails = await inbox('admin01');
const mailDetailsHtmlInfo = await mailDetailsHtml(mails[0].mailId,'admin01');
📑 Read link of an email
const link = await linkOfFirstMail('admin01');