MailBee.NET Objects 4.0

ImapUtils.ToUtf7QuotedString Method 

Converts the specified string into the IMAP4 UTF-7 Modified quoted string.

public static string ToUtf7QuotedString(
   string s
);

Parameters

s
The string (usually, a folder name) to be converted into the IMAP4 UTF-7 Modified quoted string.

Return Value

The IMAP4 UTF-7 Modified quoted string.

Remarks

This method converts the source string contents into UTF-7 Modified string and escapes all quote and backslash characters and encloses the result in quotes. If s is a null reference (Nothing) in Visual Basic), empty quoted string ("") is returned.

The method can be used to refer international folder names when building an IMAP4 request to create/delete/rename or otherwise manage folder manually (i.e. using ExecuteCustomCommand method).

Note   SelectFolder, CreateFolder, etc apply character escaping and UTF-7 Modified transformations automatically (unless Utf7EncodeFolderNames is false). The developer should not attempt to use ToUtf7QuotedString method in this case. Even if Utf7EncodeFolderNames is false, quote and backslash characters in folder names are still automatically escaped, and the developer should use ToUtf7String rather than ToUtf7QuotedString to apply UTF-7 Modified.

See Also

ImapUtils Class | MailBee.ImapMail Namespace | ExecuteCustomCommand