
Security News
The Next Open Source Security Race: Triage at Machine Speed
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.
Mailisk is an end-to-end email testing platform. It allows you to receive emails with code and automate email tests.
For a more step-by-step walkthrough see the NodeJS Guide.
npm install --save-dev mailisk
yarn add mailisk --dev
After installing the library import it and set the API Key
const { MailiskClient } = require("mailisk");
// create client
const mailisk = new MailiskClient({ apiKey: "YOUR_API_KEY" });
// send email (using virtual SMTP)
await mailisk.sendVirtualEmail(namespace, {
from: "test@example.com",
to: `john@${namespace}.mailisk.net`,
subject: "Testing",
text: "This is a test.",
});
// receive email
const result = await mailisk.searchInbox(namespace);
console.log(result);
This library wraps the REST API endpoints. Find out more in the API Reference.
searchInbox(namespace, params?)Use searchInbox to fetch messages that arrived in a given namespace, optionally waiting until the first new mail shows up.
For the full parameter options see the endpoint reference.
Default behaviour:
wait: false).requestOptions.timeout).from_timestamp).// wait up to the default 5 min for *any* new mail
const { data: emails } = await mailisk.searchInbox(namespace);
// custom 60-second timeout
await mailisk.searchInbox(namespace, {}, { timeout: 1000 * 60 });
// polling pattern — return immediately, even if inbox is empty
await mailisk.searchInbox(namespace, { wait: false });
A common pattern is to wait for the email your UI just triggered (e.g. password-reset).
Pass to_addr_prefix so you don’t pick up stale messages:
const { data: emails } = await mailisk.searchInbox(namespace, {
to_addr_prefix: `john@${namespace}.mailisk.net`,
});
Send an email using Virtual SMTP. This will fetch the SMTP settings for the selected namespace and send an email. These emails can only be sent to an address that ends in @{namespace}.mailisk.net.
const namespace = "mynamespace";
await mailisk.sendVirtualEmail(namespace, {
from: "test@example.com",
to: `john@${namespace}.mailisk.net`,
subject: "This is a test",
text: "Testing",
});
This does not call an API endpoint but rather uses nodemailer to send an email using SMTP.
listNamespaces()List all namespaces associated with the current API Key.
const namespacesResponse = await mailisk.listNamespaces();
// will be ['namespace1', 'namespace2']
const namespaces = namespacesResponse.map((nr) => nr.namespace);
getAttachment(attachmentId)Get information about an attachment.
const attachment = await mailisk.getAttachment(attachmentId);
downloadAttachment(attachmentId)Retrieve the raw bytes of a file attached to an email message.
Typically you call this after searchInbox → iterate over email.attachments[] → pass the desired attachment.id.
import fs from "node:fs";
import path from "node:path";
// assume 'email' was fetched via searchInbox()
const { id, filename } = email.attachments[0];
// download the attachment
const buffer = await mailisk.downloadAttachment(id);
// save to disk (preserve original filename)
fs.writeFileSync(filename, buffer);
Streaming large files
downloadAttachment returns the entire file as a single Buffer. If you expect very large attachments and want to avoid holding them fully in memory, use getAttachment(attachmentId).download_url and stream with fetch / axios instead:
const meta = await mailisk.getAttachment(id);
const res = await fetch(meta.download_url);
const fileStream = fs.createWriteStream(filename);
await new Promise((ok, err) => res.body.pipe(fileStream).on("finish", ok).on("error", err));
FAQs
Mailisk library for NodeJS
The npm package mailisk receives a total of 15,471 weekly downloads. As such, mailisk popularity was classified as popular.
We found that mailisk 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
Claude Opus 4.6 has uncovered more than 500 open source vulnerabilities, raising new considerations for disclosure, triage, and patching at scale.

Research
/Security News
Malicious dYdX client packages were published to npm and PyPI after a maintainer compromise, enabling wallet credential theft and remote code execution.

Security News
gem.coop is testing registry-level dependency cooldowns to limit exposure during the brief window when malicious gems are most likely to spread.