Commit 01a94e5b authored by Robin Sonnabend's avatar Robin Sonnabend
Browse files

Merge branch 'master' into 'master'

Set Message-ID in outgoing mails

See merge request !1
parents 36f4d4d7 6ca85fc9
......@@ -12,6 +12,8 @@ from datetime import datetime, date, timedelta
import requests
from io import BytesIO
import ipaddress
from socket import getfqdn
from uuid import uuid4
import config
......@@ -81,6 +83,7 @@ class MailManager:
msg["From"] = self.from_addr
msg["To"] = to_addr
msg["Subject"] = subject
msg["Message-ID"] = "{}@{}".format(uuid4(), getfqdn())
msg.attach(MIMEText(content, _charset="utf-8"))
if appendix is not None:
for name, file_like in appendix:
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