server: handle multipart/mixed with an html or text subpart
This commit is contained in:
parent
87d687cde5
commit
e8c58bdbd0
@ -325,6 +325,14 @@ fn extract_mixed(m: &ParsedMail) -> Result<Body, Error> {
|
||||
return extract_related(sp);
|
||||
}
|
||||
}
|
||||
for sp in &m.subparts {
|
||||
let body = sp.get_body()?;
|
||||
match sp.ctype.mimetype.as_str() {
|
||||
"text/plain" => return Ok(Body::PlainText(PlainText { text: body })),
|
||||
"text/html" => return Ok(Body::Html(Html { html: body })),
|
||||
_ => (),
|
||||
}
|
||||
}
|
||||
Err("extract_mixed".into())
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user