.eml) or Microsoft Outlook (.msg) files.
Please see this guide for more instructions on setting up Unstructured locally, including setting up required system dependencies.
Using Unstructured
Retain Elements
Under the hood, Unstructured creates different “elements” for different chunks of text. By default we combine those together, but you can easily keep that separation by specifyingmode="elements".
Processing Attachments
You can process attachments withUnstructuredEmailLoader by setting process_attachments=True in the constructor. By default, attachments will be partitioned using the partition function from unstructured. You can use a different partitioning function by passing the function to the attachment_partitioner kwarg.
Using OutlookMessageLoader
Connect these docs programmatically to Claude, VSCode, and more via MCP for real-time answers.