Contents · Forum Home · StreamSec Tools 4.1.5.363 documentation

MailSafeFolderSegment

function MailSafeFolderSegment(const aName: string; out aSegment: string): Boolean;
THE FOLDER ALLOWLIST: one segment of a folder name, as IMAP spells it on the wire and as the store names its '.Name' directory. What MailSafeSegment accepts, and also a name in the modified UTF-7 of RFC 3501 sec.5.1.3 whose direct characters are letters, digits, underscore, hyphen, an interior space and '&-'. The name must be the canonical spelling of what it decodes to, and that text may hold no control character, no lone surrogate, no noncharacter U+FFFE or U+FFFF and no bidirectional control (U+061C, U+200E, U+200F, U+202A to U+202E, U+2066 to U+2069). Bounded by cMailMaxSegment. Account directories and local parts stay with MailSafeSegment.