appendMessage method

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

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. Compare also the appendMessageText method.

Implementation

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