From c49b57ad1d9e85bd8096562f5fb466add36ae267 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Fri, 16 Oct 2020 16:07:59 +0200 Subject: [PATCH] stages/email: fix make_msgid call --- passbook/stages/email/tasks.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/passbook/stages/email/tasks.py b/passbook/stages/email/tasks.py index 87c8a2f69..71e0db272 100644 --- a/passbook/stages/email/tasks.py +++ b/passbook/stages/email/tasks.py @@ -35,8 +35,7 @@ def send_mails(stage: EmailStage, *messages: List[EmailMultiAlternatives]): base=MonitoredTask, ) def send_mail(self: MonitoredTask, email_stage_pk: int, message: Dict[Any, Any]): - """Send Email according to EmailStage parameters from background worker. - Automatically retries if message couldn't be sent.""" + """Send Email for Email Stage. Retries are scheduled automatically.""" self.save_on_success = False try: stage: EmailStage = EmailStage.objects.get(pk=email_stage_pk) @@ -49,7 +48,7 @@ def send_mail(self: MonitoredTask, email_stage_pk: int, message: Dict[Any, Any]) setattr(message_object, key, value) message_object.from_email = stage.from_address # Because we use the Message-ID as UID for the task, manually assign it - message_id = make_msgid(DNS_NAME) + message_id = make_msgid(domain=DNS_NAME) message_object.extra_headers["Message-ID"] = message_id LOGGER.debug("Sending mail", to=message_object.to)