uidFetchMessage method

Future<FetchImapResult> uidFetchMessage(
  1. int messageUid,
  2. String fetchContentDefinition, {
  3. Duration? responseTimeout,
})

Fetches a single messages identified by the messageUid

fetchContentDefinition the definition of what should be fetched from the message, e.g. 'BODY[]' or 'ENVELOPE', etc.

Also compare uidFetchMessagesByCriteria.

Specify a responseTimeout when a response is expected within the given time.

Implementation

Future<FetchImapResult> uidFetchMessage(
  int messageUid,
  String fetchContentDefinition, {
  Duration? responseTimeout,
}) =>
    _fetchMessages(
      true,
      'UID FETCH',
      MessageSequence.fromId(messageUid),
      fetchContentDefinition,
      responseTimeout: responseTimeout,
    );