melib/attachments: ensure MIME boundary prefixed with CRLF
Sometimes attachment bytes don't end with CRLF, so we must prefix the boundary line ourselves. Signed-off-by: Manos Pitsidianakis <manos@pitsidianak.is>
This commit is contained in:
parent
5e77821f78
commit
60c90d7549
1 changed files with 3 additions and 0 deletions
|
@ -813,6 +813,9 @@ impl Attachment {
|
|||
ret.push_str(&boundary_start);
|
||||
into_raw_helper(p, ret);
|
||||
}
|
||||
if !ret.ends_with("\r\n") {
|
||||
ret.push_str("\r\n");
|
||||
}
|
||||
ret.push_str(&format!("--{}--\r\n\r\n", boundary));
|
||||
}
|
||||
ContentType::MessageRfc822 => {
|
||||
|
|
Loading…
Add table
Reference in a new issue