snippets_js
Listener
New listener
const mailListener = await yepcode.listener.imap("your-mailbox");
mailListener.start((mail) => {
console.log(`New mail message received`, mail);
const { messageId, from, to, date, subject, body } = mail;
const { text, html } = body;
});