read file as binary

This commit is contained in:
Thomas Steen Rasmussen 2019-08-08 11:21:53 +02:00
parent f594815685
commit d1c3535c7e

View file

@ -19,7 +19,7 @@ def add_sponsorticket_email(ticket):
) )
filename = "sponsor_ticket_{}.pdf".format(ticket.pk) 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 # add email to outgoing email queue
return add_outgoing_email( return add_outgoing_email(
text_template="emails/sponsorticket_email.txt", text_template="emails/sponsorticket_email.txt",