read file as binary

This commit is contained in:
Thomas Steen Rasmussen 2019-08-08 11:21:53 +02:00
parent f594815685
commit d1c3535c7e
1 changed files with 1 additions and 1 deletions

View File

@ -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",