Method Create
- Namespace
- MailFathom.Application.Emails.Mailboxes
- Assembly
- MailFathom.Application.dll
Create(MailboxScope, string?, string?, string?, DateTimeOffset?, DateTimeOffset?, bool?, bool?, EmailTimelineDirection)
Validates and normalizes what a request asked for.
public static EmailTimelineFilter Create(MailboxScope scope, string? senderAddress, string? recipientAddress, string? subjectFragment, DateTimeOffset? receivedOnOrAfter, DateTimeOffset? receivedBefore, bool? isRemotelySeen, bool? hasAttachments, EmailTimelineDirection direction)
Parameters
scopeMailboxScopeThe accounts and folders to restrict to.
senderAddressstringThe address the sender must carry, in any case, or null for any sender.
recipientAddressstringThe address a
ToorCcrecipient must carry, or null for any recipient.subjectFragmentstringThe fragment the subject must contain, or null for any subject.
receivedOnOrAfterDateTimeOffset?The inclusive start of the received range, or null for no start.
receivedBeforeDateTimeOffset?The exclusive end of the received range, or null for no end.
isRemotelySeenbool?The remote
\Seenstate to require, or null for either.hasAttachmentsbool?Whether attachments are required, or null for either.
directionEmailTimelineDirectionThe end of the timeline to read from.
Returns
- EmailTimelineFilter
The validated filter.
Exceptions
- ArgumentNullException
Thrown when
scopeis null.- ArgumentOutOfRangeException
Thrown when
directionis not a defined member.- MailboxQueryFilterInvalidException
Thrown when an address is unusable or over-long, the subject fragment is too long, or the received range can select nothing.