Socket
Socket
Sign inDemoInstall

eml-to-pdf

Package Overview
Dependencies
100
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    eml-to-pdf

Convert EML files to PDF, save attachments, rename EML files


Version published
Weekly downloads
16
decreased by-73.33%
Maintainers
1
Install size
10.4 MB
Created
Weekly downloads
 

Readme

Source

eml-to-pdf

Convert EML email files to PDF.

EML files are email messages in MIME RFC 822 standard format.

Usage

This module is usable in three related use cases:

  • rename the EML file to a recognisable file
  • save attachments from the message to disk
  • save the message to a PDF file, with an email header

Rename the email message

Rename the eml file using data from the email message in this format: yyyy.mm.dd - from.name - subject.eml

Files with the same filename will receive a trailing counter, eg: yyyy.mm.dd - from.name - subject_1.eml.

var eml2pdf = new Eml2Pdf("filename.eml");

eml2pdf.renameFile();

TODO: allow custom filename formatting

Save attachments to disk

Save the attachments in the email message to disk. These will be saved along the EML file in a subdirectory named with the naming scheme from renameFile.

var eml2pdf = new Eml2Pdf("filename.eml");

eml2pdf.saveAttachmentsFromEML();

TODO: accept a default directory as parameter where attachments will be saved

Convert email message to PDF

A pdf file will be saved to disk with the naming scheme from renameFile . It will have a header containing time, sender, receiver, Reply-to, CC and subject.

var eml2pdf = new Eml2Pdf("filename.eml");

eml2pdf.convertEMLtoPDF();
  • TODO: add a table with attachments info at the end of the pdf
  • TODO: provide ability to set scaling options for the PDF
  • TODO: reduce the impact from message CSS on the header layout

KNOWN ISSUES: the PDF will be scaled on HiDPI screens.

Installation

Clone this repository or run

npm install eml-to-pdf

License

ISC

Feedback

Feedback and pull requests are welcome

Keywords

FAQs

Last updated on 02 Apr 2019

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc