Table of Contents

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

decodedFileName string

The file name after its RFC 2047 or RFC 2231 transport encoding was decoded.

fileName AttachmentFileName

The normalized name, when anything usable remained.

Returns

bool

true when a usable name remained; otherwise false.

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.