MSG to EML Converter (Robust)
AI-generatedOverview
This node converts .MSG email files into .EML format. It robustly handles different email body formats including HTML, RTF, and plain text (linkifying URLs). It also preserves email attachments during the conversion. This node is useful for workflows that need to process or archive emails originally in MSG format by converting them into the more widely supported EML format.
Use Case Examples
- Converting MSG files received from Microsoft Outlook into EML for compatibility with other email clients or systems.
- Extracting and preserving email content and attachments from MSG files for further processing or storage.
Output
Binary
The node outputs the converted EML file as binary data under the key 'data'.
JSON
json- Original input JSON data passed through.binarydata- Binary data containing the converted EML file in 'message/rfc822' format.
Dependencies
- @kenjiuno/msgreader for parsing MSG files
- nodemailer for generating EML format emails
- rtf-to-html-converter for converting RTF email bodies to HTML
Troubleshooting
- If the node fails to parse the MSG file, ensure the input binary data is a valid MSG file.
- Errors related to missing email body content may occur if the MSG file lacks HTML, RTF, or plain text bodies; the node attempts to handle all these cases but may fail on malformed files.
- Attachment extraction depends on the MSG file structure; missing attachments in output may indicate unsupported or corrupted attachments in the source MSG file.
Links
- Nodemailer - Library used to create EML messages.
- msgreader GitHub Repository - Library used to parse MSG files.
- rtf-to-html-converter - Library used to convert RTF email bodies to HTML.