mirror of
https://git.proxmox.com/git/proxmox
synced 2025-08-15 00:12:49 +00:00
sys: email: move Auto-Submitted header up
Move the Auto-Submitted header out of the multipart section. Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
This commit is contained in:
parent
8e5c164bf5
commit
5517d6f839
@ -66,12 +66,13 @@ pub fn sendmail(
|
|||||||
let localtime = proxmox_time::localtime(now)?;
|
let localtime = proxmox_time::localtime(now)?;
|
||||||
let rfc2822_date = proxmox_time::strftime("%a, %d %b %Y %T %z", &localtime)?;
|
let rfc2822_date = proxmox_time::strftime("%a, %d %b %Y %T %z", &localtime)?;
|
||||||
let _ = writeln!(body, "Date: {}", rfc2822_date);
|
let _ = writeln!(body, "Date: {}", rfc2822_date);
|
||||||
|
body.push_str("Auto-Submitted: auto-generated;\n");
|
||||||
|
|
||||||
if is_multipart {
|
if is_multipart {
|
||||||
body.push('\n');
|
body.push('\n');
|
||||||
body.push_str("This is a multi-part message in MIME format.\n");
|
body.push_str("This is a multi-part message in MIME format.\n");
|
||||||
let _ = write!(body, "\n--{}\n", boundary);
|
let _ = write!(body, "\n--{}\n", boundary);
|
||||||
}
|
}
|
||||||
body.push_str("Auto-Submitted: auto-generated;\n");
|
|
||||||
if let Some(text) = text {
|
if let Some(text) = text {
|
||||||
body.push_str("Content-Type: text/plain;\n");
|
body.push_str("Content-Type: text/plain;\n");
|
||||||
body.push_str("\tcharset=\"UTF-8\"\n");
|
body.push_str("\tcharset=\"UTF-8\"\n");
|
||||||
|
Loading…
Reference in New Issue
Block a user