We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ba4517c commit 2a49a83Copy full SHA for 2a49a83
src/parsers/message.rs
@@ -314,9 +314,10 @@ impl MessageParser {
314
message.text_body.push(message.parts.len());
315
}
316
317
- let is_html = mime_type == MimeType::TextHtml;
318
-
319
- if !is_text || !add_to_html && is_html || !add_to_text && !is_html {
+ if !is_multipart && !add_to_text && !add_to_html
+ || (is_multipart || mime_type == MimeType::Inline)
+ && (!add_to_text || !add_to_html)
320
+ {
321
message.attachments.push(message.parts.len());
322
323
@@ -338,6 +339,8 @@ impl MessageParser {
338
339
(Cow::Borrowed(bytes), None) => String::from_utf8_lossy(bytes),
340
};
341
342
+ let is_html = mime_type == MimeType::TextHtml;
343
+
344
if is_html {
345
PartType::Html(text)
346
} else {
0 commit comments