attach file contents, not the file object

This commit is contained in:
Thomas Steen Rasmussen 2016-05-30 20:50:39 +02:00
parent 8a499ab6de
commit 55fccf54fe

View file

@ -57,7 +57,7 @@ def send_invoice_email(invoice):
formatdict=formatdict, formatdict=formatdict,
subject=subject, subject=subject,
sender='noreply@bornfiber.dk', sender='noreply@bornfiber.dk',
attachment=invoice.pdf, attachment=invoice.pdf.read(),
) )