Skip to content

Commit

Permalink
Enforce SMTPUTF8 policy
Browse files Browse the repository at this point in the history
  • Loading branch information
Psych0meter authored Dec 24, 2024
1 parent ac09db4 commit d28cf36
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion intelmq/bots/outputs/templated_smtp/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@
import ssl
from typing import List, Optional
from email.message import EmailMessage
from email import policy
try:
from jinja2 import Template
except:
Expand Down Expand Up @@ -190,7 +191,7 @@ def process(self):
if self.smtp_authentication:
smtp.login(user=self.username, password=self.password)

msg = EmailMessage()
msg = EmailMessage(policy=policy.SMTPUTF8)
msg['Subject'] = self.templates["subject"].render(event=event)
msg['From'] = self.templates["from"].render(event=event)
msg['To'] = self.templates["to"].render(event=event)
Expand Down

0 comments on commit d28cf36

Please sign in to comment.