email-parser-toolkit
Reactive icon

Email Parser Toolkit

version 1.0.0 (Compatible with OutSystems 11)
Uploaded
 on 5 Apr (yesterday)
 by 
0.0
 (0 ratings)
email-parser-toolkit

Email Parser Toolkit

Documentation
1.0.0

⚙️ How to Use


Step 1: Add Dependency

  • Install EmailParserLib in your module

Step 2: Use the Parser

Input:

  • FileName (Text)
  • FileBinaryContent (Binary )

Step 3: Call JavaScript

parseEmail(FileName, FileBinaryContent) .then(result => { $parameters.Output = JSON.stringify(result); $resolve(); }) .catch(error => { console.error(error); $reject(); });

Step 4: Deserialize JSON

  • Map output to ParsedEmail structure

Step 5: Render Data

  • Use HTML_To_Inject for preview
  • Use Attachments for downloads

📄 Output Structure

{ "Subject": "", "From": "", "To": "", "CC": "", "BCC": "", "BodyHTML": "", "Attachments": [], "HTML_To_Inject": "" }

🔐 Security Considerations

  • Always sanitize HTML using DOMPurify
  • Avoid rendering raw HTML directly
  • Validate file size before parsing
  • Restrict attachment types if needed

⚠️ Limitations

  • Large files may impact browser performance
  • Base64 attachments increase payload size
  • .msg parsing depends on third-party reader

💡 Best Practices

  • Limit file size (e.g. 10MB)
  • Use lazy loading for large attachments
  • Render HTML inside controlled container
  • Avoid storing raw binary in DB