mail: keep a backend's sync state, and build messages outside Gmail

A JMAP account syncs from state strings rather than Gmail's numeric historyId, and its server wants the From, Date and Message-ID that Gmail adds to a draft itself. The mailbox now keeps an opaque state, which the cache saves (its layout goes to version 4, so the next run reads the mail again), and the RFC 5322 builder moves from Gmail.zig to mime.zig, taking those headers when the caller has them.


Author rockorager.dev
Date Commit Parent 57d29be0
+258 -168
6 changed files
+258 -168
6 changed files