ImapUtilsToUtf7String Method
Converts the specified string into the IMAP4 UTF-7 Modified string.

Namespace: MailBee.ImapMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.5.0 build 687 for .NET 4.5
Syntax
public static string ToUtf7String(
	string s
)

Parameters

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

Return Value

Type: String
The IMAP4 UTF-7 Modified string, or a null reference (Nothing in Visual Basic) if s is a null reference.
Remarks

ToUtf7QuotedString(String) method should be used in the case if the developer constructs the entire request manually (for instance, for further sending it to the server using ExecuteCustomCommand(String, String) method) and wants the target string being enclosed in quotes (including proper escaping of any quotes inside the string) as well as being UTF-7M transformed.

ToUtf7String(String) method should be used for strings which will be quote/slash-escaped later (for instance, if the result of ToUtf7String(String) is passed to a method such as SelectFolder(String) which automatically escapes folder names).

Note Note
By default (Utf7EncodeFolderNames is true), all Imap methods which deal with folder names apply UTF-7M automatically (and there is no need to use ToUtf7String(String) method). Even if Utf7EncodeFolderNames is false and there is a need to process (e.g. select) a folder which name was received from the server, it's usually easier to directly use raw names of folders (e.g. RawName) than to manually convert decoded names (such as Name) back to UTF-7M.
See Also