Method TryNormalize
- Namespace
- MailFathom.Domain.Emails
- Assembly
- MailFathom.Domain.dll
TryNormalize(string?, out AttachmentFileName)
Normalizes a decoded file name into one that is safe to keep.
public static bool TryNormalize(string? decodedFileName, out AttachmentFileName fileName)
Parameters
decodedFileNamestringThe file name after its RFC 2047 or RFC 2231 transport encoding was decoded.
fileNameAttachmentFileNameThe normalized name, when anything usable remained.
Returns
Remarks
A part left with nothing usable is unnamed rather than given a synthetic name, because a generated
attachment-1.bin would be indistinguishable from a name the sender actually wrote.