aboutsummaryrefslogtreecommitdiff
path: root/src/mail/mailbox.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-07-20 15:14:34 +0200
committerAlex Auvolat <alex@adnab.me>2022-07-20 15:14:34 +0200
commitdb4ffd7135a3d780cf2f7929e9fb883e96157de4 (patch)
tree005f8f0e99a8493e96f27cebe2b085b600e4e634 /src/mail/mailbox.rs
parentc321d979af9931e0d1013acdc391333918550512 (diff)
downloadaerogramme-db4ffd7135a3d780cf2f7929e9fb883e96157de4.tar.gz
aerogramme-db4ffd7135a3d780cf2f7929e9fb883e96157de4.zip
Move to mail_parser 0.5
Diffstat (limited to 'src/mail/mailbox.rs')
-rw-r--r--src/mail/mailbox.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/mail/mailbox.rs b/src/mail/mailbox.rs
index c61ab0c..44ffe20 100644
--- a/src/mail/mailbox.rs
+++ b/src/mail/mailbox.rs
@@ -308,9 +308,10 @@ impl MailboxInternal {
},
async {
// Save mail meta
+ let mail_root = mail.parsed.get_root_part();
let meta = MailMeta {
internaldate: now_msec(),
- headers: mail.raw[..mail.parsed.offset_body].to_vec(),
+ headers: mail.raw[..mail_root.offset_body].to_vec(),
message_key: message_key.clone(),
rfc822_size: mail.raw.len(),
};
@@ -358,9 +359,10 @@ impl MailboxInternal {
},
async {
// Save mail meta
+ let mail_root = mail.parsed.get_root_part();
let meta = MailMeta {
internaldate: now_msec(),
- headers: mail.raw[..mail.parsed.offset_body].to_vec(),
+ headers: mail.raw[..mail_root.offset_body].to_vec(),
message_key: message_key.clone(),
rfc822_size: mail.raw.len(),
};