Add possibility to fetch full RFC822
This commit is contained in:
parent
b71d967889
commit
4a412b96aa
2 changed files with 7 additions and 2 deletions
|
@ -246,6 +246,11 @@ impl MailboxView {
|
||||||
IString::Literal(meta.headers.clone().try_into().unwrap()),
|
IString::Literal(meta.headers.clone().try_into().unwrap()),
|
||||||
))))
|
))))
|
||||||
}
|
}
|
||||||
|
FetchAttribute::Rfc822 => {
|
||||||
|
attributes.push(MessageAttribute::Rfc822(NString(Some(
|
||||||
|
IString::Literal(body.as_ref().unwrap().clone().try_into().unwrap()),
|
||||||
|
))))
|
||||||
|
}
|
||||||
FetchAttribute::Envelope => {
|
FetchAttribute::Envelope => {
|
||||||
attributes.push(MessageAttribute::Envelope(message_envelope(&parsed)))
|
attributes.push(MessageAttribute::Envelope(message_envelope(&parsed)))
|
||||||
}
|
}
|
||||||
|
@ -260,7 +265,6 @@ impl MailboxView {
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
tracing::info!("Fetch result: {:?}", ret);
|
|
||||||
Ok(ret)
|
Ok(ret)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -239,7 +239,8 @@ impl MailboxInternal {
|
||||||
let mail = br#"From: Garage team <garagehq@deuxfleurs.fr>
|
let mail = br#"From: Garage team <garagehq@deuxfleurs.fr>
|
||||||
Subject: Welcome to Aerogramme!!
|
Subject: Welcome to Aerogramme!!
|
||||||
|
|
||||||
This is just a test email, feel free to ignore."#;
|
This is just a test email, feel free to ignore.
|
||||||
|
"#;
|
||||||
let mail = IMF::try_from(&mail[..]).unwrap();
|
let mail = IMF::try_from(&mail[..]).unwrap();
|
||||||
self.append(mail, None).await?;
|
self.append(mail, None).await?;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue