diff --git a/server/src/graphql.rs b/server/src/graphql.rs index c6ec79e..e8ca082 100644 --- a/server/src/graphql.rs +++ b/server/src/graphql.rs @@ -325,6 +325,14 @@ fn extract_mixed(m: &ParsedMail) -> Result { 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()) }