rbs-imap
v1.0.0
Published
Get code from email using imap
Downloads
3
Readme
Rbs imap
Get code from email using imap. CommonJS support and ES Modules support.
Installation
npm install rbs-imap --save
Usage
// Using ES6: import { RbsImap } from "rbs-imap";
// OR: import RbsImap from "rbs-imap";
const RbsImap = require('rbs-imap');
const config = {
user: '[email protected]',
password: 'yourPassword',
host: 'imap-mail.outlook.com',
box: [ 'INBOX', 'JUNK' ], // INBOX mailbox, JUNK mailbox (spam)
port: 993,
tls: true,
authTimeout: 5000,
since: 5*60*1000, // miniseconds
filterMail: '[email protected]',
regex: /\b\d{6}\b/ // Regex to filter code in messages
};
// Get code from mail
const imap = new RbsImap(config);
const res = await imap.getCode();
Release History
1.0.0 - 7/05/2024
- Updates:
- Release 1.0.0