mime-multipart-stream

0.2.0 • Public • Published

MIME Multipart Stream

Travis CI Test Status

Creates a readable stream composed of multiple MIME parts to be injected into an overall email

npm install mime-multipart-stream

To use:

var stream = mimeMultipartStream({
  boundary: '1234567890',
  type: 'alternative'
});
stream.add({
  type: 'text/plain; charset=UTF-8',
  transferEncoding: 'quoted-printable',
  body: textPlainStream
});
stream.add({
  type: 'text/html; charset=UTF-8',
  transferEncoding: 'quoted-printable',
  body: textHtmlStream
});

When initialising a new stream, there are 2 options available in the options object:

  • type: This should be one of the valid multipart subtypes eg. mixed, alternative.
  • boundary: This should be a an ASCII boundary string that is used to generate the MIME separators between each MIME part.

Once you have created your stream, use the add method to add multiple readable streams. Each stream is added using the initialisation options found in the mime-part-stream (GitHub) module.

Once ready, use the standard readable streams API to consume the content.

Readme

Keywords

Package Sidebar

Install

npm i mime-multipart-stream

Weekly Downloads

1

Version

0.2.0

License

none

Last publish

Collaborators

  • connrs