all lists on lists.proxmox.com
 help / color / mirror / Atom feed
From: Gabriel Goller <g.goller@proxmox.com>
To: pbs-devel@lists.proxmox.com
Subject: [pbs-devel] [PATCH proxmox] sys: email: move Auto-Submitted header up
Date: Wed, 29 Nov 2023 15:15:11 +0100	[thread overview]
Message-ID: <20231129141511.192244-1-g.goller@proxmox.com> (raw)

Move the Auto-Submitted header out of the multipart section.

Signed-off-by: Gabriel Goller <g.goller@proxmox.com>
---
 proxmox-sys/src/email.rs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/proxmox-sys/src/email.rs b/proxmox-sys/src/email.rs
index c94f634..be92f30 100644
--- a/proxmox-sys/src/email.rs
+++ b/proxmox-sys/src/email.rs
@@ -66,12 +66,13 @@ pub fn sendmail(
     let localtime = proxmox_time::localtime(now)?;
     let rfc2822_date = proxmox_time::strftime("%a, %d %b %Y %T %z", &localtime)?;
     let _ = writeln!(body, "Date: {}", rfc2822_date);
+    body.push_str("Auto-Submitted: auto-generated;\n");
+
     if is_multipart {
         body.push('\n');
         body.push_str("This is a multi-part message in MIME format.\n");
         let _ = write!(body, "\n--{}\n", boundary);
     }
-    body.push_str("Auto-Submitted: auto-generated;\n");
     if let Some(text) = text {
         body.push_str("Content-Type: text/plain;\n");
         body.push_str("\tcharset=\"UTF-8\"\n");
-- 
2.39.2





             reply	other threads:[~2023-11-29 14:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-29 14:15 Gabriel Goller [this message]
2023-11-29 14:18 ` [pbs-devel] applied: " Wolfgang Bumiller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231129141511.192244-1-g.goller@proxmox.com \
    --to=g.goller@proxmox.com \
    --cc=pbs-devel@lists.proxmox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal