ImapUtilsToLiteral Method (String)
Converts a text string into UTF-8 encoded IMAP LITERAL+ string.

Namespace: MailBee.ImapMail
Assembly: MailBee.NET (in MailBee.NET.dll) Version: 12.2.0 build 630 for .NET 4.5
public static string ToLiteral(
	string s


Type: SystemString
The text string to convert.

Return Value

Type: String
The UTF-8 encoded LITERAL+ string, or an empty quoted string ("") if the source string is an empty string or a null reference (Nothing in Visual Basic).

You'll typically use this method to build search string in UTF-8 charset when the IMAP server is Gmail.

Note Note
This method produces literals in very efficient LITERAL+ syntax. Gmail does not advertize the support of LITERAL+ extension but it's actually supported.
See Also