diff --git a/melib/src/email.rs b/melib/src/email.rs index fd72f5213..89cc1375f 100644 --- a/melib/src/email.rs +++ b/melib/src/email.rs @@ -280,7 +280,7 @@ impl Envelope { builder.set_content_type_from_bytes(value); let mut boundary = None; for (n, v) in params { - if n == b"boundary" { + if n.eq_ignore_ascii_case(b"boundary") { boundary = Some(v); break; } diff --git a/melib/src/email/attachments.rs b/melib/src/email/attachments.rs index e7d95906d..f286ccbe9 100644 --- a/melib/src/email/attachments.rs +++ b/melib/src/email/attachments.rs @@ -390,7 +390,7 @@ impl fmt::Display for Attachment { let name = String::from_utf8_lossy( parameters .iter() - .find(|(name, _)| name == b"name") + .find(|(name, _)| name.eq_ignore_ascii_case(b"name")) .map(|(_, value)| value) .unwrap(), );