fetchMessages method

Future<FetchImapResult> fetchMessages(
  1. MessageSequence sequence,
  2. String? fetchContentDefinition, {
  3. int? changedSinceModSequence,
})

Fetches messages by the given definition.

sequence the sequence IDs of the messages that should be fetched fetchContentDefinition the definition of what should be fetched from the message, e.g. (UID ENVELOPE HEADER[]), BODY[] or ENVELOPE, etc Specify the changedSinceModSequence in case only messages that have been changed since the specified modification sequence should be fetched. Note that this requires the CONDSTORE or QRESYNC server capability.

Implementation

Future<FetchImapResult> fetchMessages(
    MessageSequence sequence, String? fetchContentDefinition,
    {int? changedSinceModSequence}) {
  return _fetchMessages(false, 'FETCH', sequence, fetchContentDefinition,
      changedSinceModSequence: changedSinceModSequence);
}