From d1c3535c7e336a7b6163702da68b9f38354ca768 Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Thu, 8 Aug 2019 11:21:53 +0200 Subject: [PATCH] read file as binary --- src/sponsors/email.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sponsors/email.py b/src/sponsors/email.py index 685c1630..83aebc46 100644 --- a/src/sponsors/email.py +++ b/src/sponsors/email.py @@ -19,7 +19,7 @@ def add_sponsorticket_email(ticket): ) filename = "sponsor_ticket_{}.pdf".format(ticket.pk) - with open(os.path.join(settings.PDF_ARCHIVE_PATH, filename)) as f: + with open(os.path.join(settings.PDF_ARCHIVE_PATH, filename), "rb") as f: # add email to outgoing email queue return add_outgoing_email( text_template="emails/sponsorticket_email.txt",