https://github.com/master131/msg2eml.js
A javascript library to convert Outlook *.msg files to *.eml
https://github.com/master131/msg2eml.js
Last synced: over 1 year ago
JSON representation
A javascript library to convert Outlook *.msg files to *.eml
- Host: GitHub
- URL: https://github.com/master131/msg2eml.js
- Owner: master131
- License: mit
- Created: 2020-11-07T23:48:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-27T05:48:26.000Z (about 2 years ago)
- Last Synced: 2025-03-18T03:51:26.999Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 1.87 MB
- Stars: 10
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# msg2eml.js
A javascript library to convert Outlook *.msg files to *.eml natively in the browser.
## Demo
Try it out [here](https://master131.github.io/msg2eml.js/demo/index.html).
## Installation & Building
Make sure you have Typescript installed globally (or adjust the package.json accordingly).
``npm install``
``npm run build``
lib/dist/msg2eml.bundle.js (non-minified) and lib/dist/msg2eml.min.js (minified) will be generated.
This library can function in IE11 given the correct polyfills are present (see the demo) and the "use strict"/'use strict' keywords have been stripped from the msg2eml.js library.
## API
This adds a function called msg2eml into the global window object.
| Function Name | Parameters | Returns | Description |
|----------------|---------------------------------------------------------------|-------------------------------------------------------------------------------------|-------------------------|
| msg2eml | Blob/Array/ArrayBuffer containing the contents of the .msg file | Promise - a promise which will generate the string content of the .eml file | Converts a .msg to .eml |
See the demo directory for an example of this in-use.
It can also be used as per below outside a browser:
``var msg2eml = require('./msg2eml.bundle');``
## Thanks
This would not be possible without all the hard work of the people who wrote a lot of the underlying libraries which msg2eml.js depends on:
- https://github.com/JoshData/convert-outlook-msg-file
- https://github.com/mazira/rtf-stream-parser
- https://github.com/SheetJS/js-cfb
- https://github.com/papnkukn/eml-format
- https://github.com/HiraokaHyperTools/DeCompressRTF
- https://github.com/moment/moment
- https://github.com/peterolson/BigInteger.js