implement download attachments feature

This commit is contained in:
Clément DOUIN
2021-01-15 12:21:07 +01:00
parent 6f7ee69cfe
commit 1536fdb894
7 changed files with 112 additions and 29 deletions
+4
View File
@@ -15,6 +15,7 @@ pub enum Error {
ParseEmailError(mailparse::MailParseError),
ReadEmailNotFoundError(String),
ReadEmailEmptyPartError(String, String),
ExtractAttachmentsEmptyError(String),
}
impl fmt::Display for Error {
@@ -30,6 +31,9 @@ impl fmt::Display for Error {
Error::ReadEmailEmptyPartError(uid, mime) => {
write!(f, "no {} content found for uid {}", mime, uid)
}
Error::ExtractAttachmentsEmptyError(uid) => {
write!(f, "no attachment found for uid {}", uid)
}
}
}
}