From dd8bcef1a3a9d1f40a86fc11ec24f73f982665e4 Mon Sep 17 00:00:00 2001 From: Moritz Zwerger Date: Mon, 24 Feb 2025 18:28:03 +0100 Subject: [PATCH] mail loop: Don't send empty body Most mail servers will flag the message as spam, because `COMPLETELY_EMPTY` will be flagged. --- cmk/plugins/emailchecks/lib/connections.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmk/plugins/emailchecks/lib/connections.py b/cmk/plugins/emailchecks/lib/connections.py index 6bd66e25a83..5d5eed5479f 100644 --- a/cmk/plugins/emailchecks/lib/connections.py +++ b/cmk/plugins/emailchecks/lib/connections.py @@ -304,7 +304,7 @@ def send_mail( def _send_mail( self, subject: str, mail_from: str, mail_to: str, now: int, key: int ) -> tuple[str, MailID]: - mail = email.mime.text.MIMEText("") + mail = email.mime.text.MIMEText("Automatically sent by checkmk") mail["From"] = mail_from mail["To"] = mail_to mail["Subject"] = f"{subject} {now} {key}"