We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ba4517c commit 5b1e583Copy full SHA for 5b1e583
src/parsers/message.rs
@@ -316,7 +316,10 @@ impl MessageParser {
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
320
+ || (is_multipart || mime_type == MimeType::Inline)
321
+ && (!add_to_text || !add_to_html)
322
+ {
323
message.attachments.push(message.parts.len());
324
}
325
@@ -338,6 +341,8 @@ impl MessageParser {
338
341
(Cow::Borrowed(bytes), None) => String::from_utf8_lossy(bytes),
339
342
};
340
343
344
+ let is_html = mime_type == MimeType::TextHtml;
345
+
346
if is_html {
347
PartType::Html(text)
348
} else {
0 commit comments