0

How can I create a client side in-memory eml file? I've come across numerous suggestions. But none, out of the box, work in my setup. Namely where

  • the code that creates an eml file resides in a NodeJS library
  • browserify is used against this library to generate a bundle.js
  • bundle.js is used to make this behaviour available in a browser

Some of the technics I've investigated but discounted so far

https://www.npmjs.com/package/eml-format

https://github.com/BramEsposito/eml-to-pdf

Depend on the 'fs' module which browserify complains about

https://www.example-code.com/nodejs/email_examine_eml.asp

Licenced

https://github.com/nodemailer/mailparser

Looked promising but specific to reading existing emails not creating them.

https://www.npmjs.com/package/mime https://www.npmjs.com/package/mime-types

Is not used to create eml files.

https://github.com/ikr0m/mime-js

Looks promising but I've yet to get it to work.

Shane Gannon
  • 6,770
  • 7
  • 41
  • 64

1 Answers1

0

Settled upon the emailjs-mime-builder

https://github.com/emailjs/emailjs-mime-builder

Shane Gannon
  • 6,770
  • 7
  • 41
  • 64