From dde4e12ce1ea171c793beb21ba1085a9a8c7e3a9 Mon Sep 17 00:00:00 2001 From: Raphael Michel Date: Mon, 11 Oct 2021 17:36:57 +0200 Subject: [PATCH] Fix bug in 6cd32400a --- src/pretix/base/services/mail.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/pretix/base/services/mail.py b/src/pretix/base/services/mail.py index edb9587b2..0154225a4 100644 --- a/src/pretix/base/services/mail.py +++ b/src/pretix/base/services/mail.py @@ -484,7 +484,7 @@ def mail_send_task(self, *args, to: List[str], subject: str, body: str, html: st # See also https://docs.microsoft.com/en-us/exchange/troubleshoot/send-emails/smtp-submission-improvements from django_redis import get_redis_connection - redis_key = "pretix_mail_retry_" + hashlib.sha1(f"{getattr(backend, 'username', '_')}@{getattr(backend, 'host', '_')}").hexdigest() + redis_key = "pretix_mail_retry_" + hashlib.sha1(f"{getattr(backend, 'username', '_')}@{getattr(backend, 'host', '_')}".encode()).hexdigest() rc = get_redis_connection("redis") cnt = rc.incr(redis_key) rc.expire(redis_key, 300)