Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enforce SMTPUTF8 policy #2546

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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