Fix double angle brackets in From header

This commit is contained in:
2019-10-29 15:45:55 +01:00
parent 7020c53b28
commit 25af4b422a

View File

@@ -392,7 +392,7 @@ class EMailNotification(BaseNotification):
msg = MIMEMultipart('related') msg = MIMEMultipart('related')
msg["Subject"] = self.subject.format_map(variables) msg["Subject"] = self.subject.format_map(variables)
msg["From"] = "<{}>".format(self.from_header.format_map(variables)) msg["From"] = "{}".format(self.from_header.format_map(variables))
msg["To"] = "<{}>".format(recipient) msg["To"] = "<{}>".format(recipient)
msg["Date"] = email.utils.formatdate() msg["Date"] = email.utils.formatdate()
msg.attach(MIMEText(htmltext, "html", 'UTF-8')) msg.attach(MIMEText(htmltext, "html", 'UTF-8'))