SearchQueryHeaderContains Method

Match messages where the specified header contains the specified text.

Definition

Namespace: MailKit.Search
Assembly: MailKit (in MailKit.dll) Version: 5.0.0
C#
public static HeaderSearchQuery HeaderContains(
	string field,
	string text
)

Parameters

field  String
The header field to match against.
text  String
The text to match against.

Return Value

HeaderSearchQuery
A HeaderSearchQuery.

Remarks

Matches messages where the specified header contains the specified text.

  Note

This is equivalent to the HEADER search key as defined in rfc3501.

Exceptions

ArgumentNullException

field is .

-or-

text is .

ArgumentException field is empty.

See Also