MailQueryBuilder

MailQueryBuilder class

Represents the builder of search expression.

public class MailQueryBuilder

Constructors

Name Description
MailQueryBuilder() Initializes a new instance of the MailQueryBuilder class.
MailQueryBuilder(Encoding) Initializes a new instance of the MailQueryBuilder class.

Properties

Name Description
Bcc { get; } Gets the field that allows to find messages that contain the specified string in the envelope structure’s BCC field.
Body { get; } Gets the field that allows to find messages that contain the specified string in the body of the message.
Cc { get; } Gets the field that allows to find messages that contain the specified string in the envelope structure’s CC field.
DefaultEncoding { get; } Gets default encoding (charset) for query builder
From { get; } Gets the field that allows to find messages that contain the specified string in the envelope structure’s FROM field.
InternalDate { get; } Gets the field that allows to find messages by internal date.
SentDate { get; } Gets the field that allows to find messages by sent date.
Subject { get; } Gets the field that allows to find messages that contain the specified string in the envelope structure’s SUBJECT field.
Text { get; } Gets the field that allows to find the messages that contain the specified string in the headers (subject, from, to, cc) and body of the message.
To { get; } Gets the field that allows to find messages that contain the specified string in the envelope structure’s TO field.

Methods

Name Description
GetQuery() Gets the query.
Or(MailQuery, MailQuery) Search messages that match either search key. Provides disjunction between two expressions (OR).

Remarks

Note: By default, the result is the intersection (AND function) of all the messages that match those keys. To join keys by OR function, please, use Or() method of this class

See Also