All Projects → robertklep → node-mbox

robertklep / node-mbox

Licence: MIT License
mbox file parser for Node.js

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to node-mbox

mail-deduplicate
📧 CLI to deduplicate mails from mail boxes.
Stars: ✭ 134 (+109.38%)
Mutual labels:  mail, mbox
Neomutt
✉️ Teaching an Old Dog New Tricks -- IRC: #neomutt on irc.libera.chat
Stars: ✭ 2,343 (+3560.94%)
Mutual labels:  mail, mbox
nuxt-mail
Adds email sending capability to a Nuxt.js app. Adds a server route, an injected variable, and uses nodemailer to send emails.
Stars: ✭ 62 (-3.12%)
Mutual labels:  mail
himalaya
Command-line interface for email management
Stars: ✭ 1,715 (+2579.69%)
Mutual labels:  mail
SPStorkController
Now playing controller from Apple Music, Mail & Podcasts Apple's apps.
Stars: ✭ 2,515 (+3829.69%)
Mutual labels:  mail
mailx
A lightweight SMTP mail library
Stars: ✭ 17 (-73.44%)
Mutual labels:  mail
mailtrap
MailTrap has been renamed to Sendria. Please use Sendria now, MailTrap is abandoned. MailTrap is a SMTP server designed to run in your dev/test environment, that is designed to catch any email you or your application is sending, and display it in a web interface instead of sending to real world.
Stars: ✭ 14 (-78.12%)
Mutual labels:  mail
james-hupa
Apache James hupa
Stars: ✭ 20 (-68.75%)
Mutual labels:  mail
laravel-mjml
Laravel MJML offers support for rendering MJML syntax into in-line HTML that can be sent within mails.
Stars: ✭ 26 (-59.37%)
Mutual labels:  mail
bulk-mail-cli
Do quick, hassle-free email marketing with this small but very powerful tool! 🔥
Stars: ✭ 88 (+37.5%)
Mutual labels:  mail
verify-dkim
Tool to verify DKIM signatures on an mbox of emails
Stars: ✭ 70 (+9.38%)
Mutual labels:  mbox
SlmMail
Send mail from Laminas or Mezzio using external mail services.
Stars: ✭ 107 (+67.19%)
Mutual labels:  mail
mail
A custom SMTP credentials plugin for WordPress
Stars: ✭ 24 (-62.5%)
Mutual labels:  mail
is-biz-mail-php
isBizMail tells you whether a given email address belongs to a free email account provider (gmail.com, yahoo.es, yandex.ru etc) or not.
Stars: ✭ 19 (-70.31%)
Mutual labels:  mail
go-simple-mail
Golang package for send email. Support keep alive connection, TLS and SSL. Easy for bulk SMTP.
Stars: ✭ 298 (+365.63%)
Mutual labels:  mail
ESP-Mail-Client
⚡️Arduino Mail Client Library to send, read and get incoming mail notification for ESP32, ESP8266 and SAMD21 devices. The library also supported other Arduino devices using Clients interfaces e.g. WiFiClient, EthernetClient, and GSMClient.
Stars: ✭ 78 (+21.88%)
Mutual labels:  mail
Mail
基于 Net.Mail 封装的发送邮件工具类。仅需一行代码,发送邮件。支持自定义邮件发出邮箱、发出方名字等。 支持SSL加密发送。 多个接收人、抄送人。支持群发独显。 支持添加附件、多个附件。 目前大部分主流邮箱全支持。
Stars: ✭ 87 (+35.94%)
Mutual labels:  mail
mailad
Software to provision a mail server with users from a Windows or Samba 4 Active Directory
Stars: ✭ 21 (-67.19%)
Mutual labels:  mail
mailcat
Fake SMTP server that prints emails to stdout
Stars: ✭ 39 (-39.06%)
Mutual labels:  mail
Excision-Mail
Fullstack, security focused mailserver based on OpenSMTPD for OpenBSD using ansible
Stars: ✭ 108 (+68.75%)
Mutual labels:  mail

node-mbox

mbox file parser for Node.js.

Backward incompatibility warning

From version 1.0.0 onwards, message data is passed around as Buffer instead of String.

You can call msg.toString([encoding]) to convert to a string, or explicitly set the encoding option (see below).

Install

From the NPM repository:

$ npm install node-mbox

From the Github repository:

$ git clone https://github.com/robertklep/node-mbox.git
$ cd node-mbox
$ npm install [-g]

Description

This module parses mbox files, as described here. Starting with version 0.1.0, it's pretty speedy, processing a 1.5GB mbox file in about 20 seconds.

Note that this module doesn't parse the mail messages themselves, for which other solutions exist (for example the quite able mailparser module from Andris Reinman).

Example

See the included example.js:

$ npm install mailparser
$ node example < test/test-4-message.mbox

Options

  • encoding : output encoding (default: undefined, meaning message data is passed as Buffer)
  • strict : enable strict mode (emits an error when input doesn't look like valid mbox data)
  • stream: instead of collecting and emitting entire messages, emit a stream. This is useful if you want to process mailboxes that contain large messages (the aforementioned mailparser accepts message streams directly)

Usage

const Mbox = require('node-mbox');

// First, different types of instantiation:

// 1. pass it a filename
const mbox    = new Mbox('filename', { /* options */ });

// 2. pass it a string/buffer
const fs      = require('fs');
const mailbox = fs.readFileSync('filename');
const mbox    = new Mbox(mailbox, { /* options */ });

// 3. pass it a stream
const fs      = require('fs');
const stream  = fs.createReadStream('filename');
const mbox    = new Mbox(stream, { /* options */ });

// 4. pipe a stream to it
const mbox    = new Mbox({ /* options */ });
process.stdin.pipe(mbox);

// Next, catch events generated:
mbox.on('message', function(msg) {
  // `msg` is a `Buffer` instance
  console.log('got a message', msg.toString());
});

mbox.on('error', function(err) {
  console.log('got an error', err);
});

mbox.on('end', function() {
  console.log('done reading mbox file');
});

Streaming example:

const mbox = new Mbox({ stream : true });

// `message` event emits stream
mbox.on('message', function(stream) {
  stream.on('data', function(chunk) {
    ...
  }).on('end', function() {
    ...
  });
});

process.stdin.pipe(mbox);

Testing

There is a limited number of tests:

$ cd /path/to/node-mbox/
$ npm test

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].