Commit 3ad59355 authored by Dominik Woiwode's avatar Dominik Woiwode
Browse files

Add message-id needed for finf-mails

parent a1708fbf
import hashlib
import os
import smtplib
from dataclasses import dataclass
......@@ -50,6 +51,7 @@ def sendFRMail(text: str, subject: str, sender: MailParticipant, receivers: List
if ldapPassword is None:
raise ValueError("Require ldapPassword")
mail = MIMEMultipart()
mail['Message-Id'] = f"{hashlib.sha256(text.encode('utf-8')).hexdigest()}"
mail['Content-transfer-encoding'] = '8bit'
mail['From'] = sender.alias
mail['Subject'] = subject
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment