MSG to EML Converter (Robust)

Converts .MSG to .EML, robustly handling HTML, RTF, or linkifying plain text, and preserving attachments.

MSG to EML Converter (Robust)

AI-generated

Overview

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

  1. Converting MSG files received from Microsoft Outlook into EML for compatibility with other email clients or systems.
  2. 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.
  • binary
    • data - 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

Discussion