Update email_body.py
This commit is contained in:
parent
e981a515dd
commit
b08cf2bbf4
1 changed files with 1 additions and 1 deletions
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue