Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
IMAP Client for Node.js extracted from NodemailerApp project.
The focus for ImapFlow is to provide easy to use API over IMAP.
Source code is available from Github.
First install the module from npm:
$ npm install imapflow
next import the ImapFlow class into your script:
const { ImapFlow } = require('imapflow');
All ImapFlow methods use Promises, so you need to wait using await
or wait for the then()
method to fire until you get the response.
const { ImapFlow } = require('imapflow');
const client = new ImapFlow({
host: 'ethereal.email',
port: 993,
secure: true,
auth: {
user: 'garland.mcclure71@ethereal.email',
pass: 'mW6e4wWWnEd3H4hT5B'
}
});
const main = async () => {
// wait until client connects and authorizes
await client.connect();
// select a mailbox
await client.mailboxOpen('INBOX');
// fetch latest message source
let message = await client.fetchOne('*', { source: true });
console.log(message.source.toString());
// list subjects for all messages
// uid value is always included in FETCH response, envelope strings are in unicode.
for await (let message of client.fetch('1:*', { envelope: true })) {
console.log(`${message.uid}: ${message.envelope.subject}`);
}
// log out and close connection
await client.logout();
};
main().catch(err => console.error(err));
ImapFlow has TS typings set for compatible editors.
© 2020 Andris Reinman
Licensed for evaluation use only
FAQs
IMAP Client for Node
The npm package imapflow receives a total of 66,694 weekly downloads. As such, imapflow popularity was classified as popular.
We found that imapflow demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.