From b08cf2bbf46cd22a9a8b49e65ec15a605cb7604e Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 7 Jul 2014 17:35:30 +0530 Subject: [PATCH] Update email_body.py --- frappe/utils/email_lib/email_body.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frappe/utils/email_lib/email_body.py b/frappe/utils/email_lib/email_body.py index 649c0773af..4cbe3cd3ce 100644 --- a/frappe/utils/email_lib/email_body.py +++ b/frappe/utils/email_lib/email_body.py @@ -148,7 +148,7 @@ class EMail: def add_pdf_attachment(self, name, html): import pdfkit, os - fname = frappe.generate_hash() + ".pdf" + fname = os.path.join("/tmp", frappe.generate_hash() + ".pdf") pdfkit.from_string(html, fname) with open(fname, "rb") as fileobj: self.add_attachment(name, fileobj.read(), 'application/octet-stream')