SearchQueryHasGMailLabel Method

Match messages that have the specified GMail label.

Definition

Namespace: MailKit.Search
Assembly: MailKit (in MailKit.dll) Version: 5.0.0
C#
public static TextSearchQuery HasGMailLabel(
	string label
)

Parameters

label  String
The GMail label.

Return Value

TextSearchQuery
A TextSearchQuery.

Remarks

Matches messages that have the specified GMail label.

  Note

This is equivalent to the X-GM-LABELS search key as defined in Google's IMAP extensions and is therefor only available for use with IMAP servers that support the X-GM-EXT1 extension.

Exceptions

ArgumentNullException label is .
ArgumentException label is empty.

See Also