appendMessage method

Future<GenericImapResult> appendMessage(
  1. MimeMessage message, {
  2. List<String>? flags,
  3. Mailbox? targetMailbox,
  4. String? targetMailboxPath,
  5. Duration? responseTimeout,
})

Appends the specified MIME message.

When no targetMailbox or targetMailboxPath is specified, then the message will be appended to the currently selected mailbox. You can specify flags such as \Seen or \Draft in the flags parameter. Specify a responseTimeout when a response is expected within the given time. Compare also the appendMessageText method.

Implementation

Future<GenericImapResult> appendMessage(
  MimeMessage message, {
  List<String>? flags,
  Mailbox? targetMailbox,
  String? targetMailboxPath,
  Duration? responseTimeout,
}) =>
    appendMessageText(
      message.renderMessage(),
      flags: flags,
      targetMailbox: targetMailbox,
      targetMailboxPath: targetMailboxPath,
      responseTimeout: responseTimeout,
    );