When missing intermediate and/or parent messages in a thread, the
printed thread tree branches were completely invalid. This commit makes
sure thread node entries that have no corresponding envelopes are
accounted for in the tree structure.
- Add an ID field in ImapConnection and ImapStream that records where
each instance was created. This is useful for differentiating main
backend connections from watching thread connections (the ones that
listen to updates from the IMAP server with IDLE or polling).
- Add an imap_trace! macro that uses log::trace! internally but also
prepends the connection's ID string to each log line.
compose-hooks run before submitting an e-mail.
They perform draft validation and/or transformations.
If a hook encounters an error or warning, it will show up as a notification.
The currently available hooks are:
Warn if Date header value is far in the past or future.
Warn if important headers (From, Date, To, Cc, Bcc) are missing or invalid.
Warn if Subject, draft body mention attachments but they are missing.
Warn if draft has no subject and no body.
They can be disabled with [composing.disabled_compose_hooks] setting.