Class AttachmentDocumentFormats
- Namespace
- MailFathom.Application.Emails.Extraction.Attachments
- Assembly
- MailFathom.Application.dll
Recognizes the document format an attachment declares, and says which of them are parsed.
public static class AttachmentDocumentFormats
- Inheritance
-
AttachmentDocumentFormats
- Inherited Members
Remarks
Recognition reads the declared media type first and the file name's extension whenever that media type names no format it recognizes — so for every media type outside the table below, the file name alone decides. Both are the sender's to write, so neither is evidence about the bytes: what recognition decides is which parser is offered the content, and every parser treats what it is handed as hostile regardless.
The extension fallback exists because a generic application/octet-stream over a correctly named file is the
ordinary shape of a mail-borne document rather than an edge case. A recognized media type is never overridden by
the extension — a part declaring one is that format whatever it is called — but a mismatched media type keeps
nothing out, because a sender is as free to write one of those as to write none.
Properties
- Extracted
Gets the formats text is extracted from, as opposed to those recognition only names.
Methods
- IsExtracted(AttachmentDocumentFormat)
States whether text is extracted from a recognized format, or whether recognition only names it.
- Recognize(string, AttachmentFileName?)
Recognizes what an attachment declares itself to be.