From 55fccf54fe436c5ef098a832a5455416800e12b9 Mon Sep 17 00:00:00 2001 From: Thomas Steen Rasmussen Date: Mon, 30 May 2016 20:50:39 +0200 Subject: [PATCH] attach file contents, not the file object --- shop/email.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/shop/email.py b/shop/email.py index eec4bc55..3b187eeb 100644 --- a/shop/email.py +++ b/shop/email.py @@ -57,7 +57,7 @@ def send_invoice_email(invoice): formatdict=formatdict, subject=subject, sender='noreply@bornfiber.dk', - attachment=invoice.pdf, + attachment=invoice.pdf.read(), )