
Security News
Deno Goes the Way of the Dinosaur
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.
msglens-cli
Advanced tools
Read Outlook .msg, .eml and winmail.dat files in Node: headers, body (including bodies stored only as compressed RTF) and attachments. Library and CLI.
Read Outlook .msg, .eml and winmail.dat files from the command line or
from Node. Headers, the message body and attachments, with no Outlook and
nothing uploaded.
These are the same parsers that run in the browser at msglens.app.
npx msglens-cli read message.msg
Most real Outlook mail does not store its body as HTML or plain text. In a
sample of 20 business .msg files, 17 kept the body only in
PidTagRtfCompressed: compressed RTF with the original HTML wrapped inside it
(MS-OXRTFCP and MS-OXRTFEX). A parser that reads PidTagHtml and
PidTagBody and stops returns an empty body for those messages. This one
decompresses the RTF and un-wraps the HTML, falling back through
PidTagHtml, PidTagBodyHtml, compressed RTF and PidTagBody in that order.
It also:
winmail.dat (TNEF), including the attachments trapped inside itInstall it with npm install -g msglens-cli and the command is msglens;
or run it without installing as npx msglens-cli.
msglens read <file...> [--json] print headers and the plain-text body
msglens attachments <file...> [-o <dir>] save every attachment
msglens convert <file...> --to eml|txt [-o <dir>]
read --json prints the full parsed message (one object for one file, an
array for several). Attachment bytes are left out; names, types and sizes
stay.attachments and convert never overwrite: a second invoice.pdf is
saved as invoice (1).pdf. Attachment names are reduced to a plain file
name, so a message cannot write outside the output folder.Convert a folder of .msg files to .eml:
npx msglens-cli convert ./mail/*.msg --to eml -o ./eml
import { parseFile, parse, toEml, toText } from "msglens-cli";
const email = await parseFile("message.msg");
email.subject; // string
email.from; // { name, address } | null
email.date; // Date | null
email.bodyText; // plain text, always filled
email.body; // HTML when email.bodyKind === "html"
email.attachments; // [{ fileName, mimeType, size, content: Uint8Array, isEmbeddedMessage, ... }]
const again = await parse(bytes, "message.msg"); // from a Uint8Array or ArrayBuffer
const eml = await toEml(email); // RFC 822 text
email.body is the message's HTML exactly as the sender wrote it. It is
untrusted: sanitise it (for example with DOMPurify) before rendering it
anywhere.
An attachment with isEmbeddedMessage: true is a message attached to a
message; pass its content to parse() to read it.
Requires Node 20 or later.
msglens.app opens .msg, .eml and winmail.dat
in the browser, parsed on your device, with attachments and PDF export.
MIT. Microsoft and Outlook are trademarks of Microsoft Corporation; this project is not affiliated with Microsoft.
FAQs
Read Outlook .msg, .eml and winmail.dat files in Node: headers, body (including bodies stored only as compressed RTF) and attachments. CLI, Node library and MCP server for AI assistants.
The npm package msglens-cli receives a total of 0 weekly downloads. As such, msglens-cli popularity was classified as not popular.
We found that msglens-cli 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.

Security News
Cloudflare is acquiring Deno’s team, which will provide another year of bug fixes and security updates before ending support for the runtime.

Security News
Anthropic’s free OSS Scanner uses Mythos and other Claude models to find open source vulnerabilities and send maintainers reports with proposed fixes.

Security News
On Front Lines’ Early Adopters: CISO podcast, Andrew Becherer shares lessons from Datadog, weighs the long-term costs of AI-built tools, and explains how founders can actually gain a CISO’s trust.