I am using frappeclient in python script for sending and email (with attachment).
This is what I’m using:
frappeObj = FrappeClient('https://my_website,'administrator','password');
att="<html><head></head><body><h1>Attachment In Process</h1></body></html>";
I actually want to send directly my pdf in attachment but on passing it to print_html it is passing it as NULL . But on passing an html, it is converting it to pdf and sending. That is what I want to override. If not using that parameter (print_html) results into error.
Already tried attaching pdf directly but it is not getting attached .
Any help/suggestions will be deeply appreciated.
Any suggestions will be hugely appreciable. I seriously need help in this
Hi, I’m a bit confused why did you use FrappeClient it seems old, last update is about 3 years ago.
Did you tried to send Email from python outside Frappe Framework?
If it is, why don’t you directly use Email Delivery Service API? Such as sparkpost api.
If you tried to sending email from python inside Frappe Framework, I normally use
# args is pass to template in apps/apps/templates/emails/mail-template.html
I am using external script for doing so, in which i need to mention the doctype and attachment existed there to fetch and then append it to the mail. Any documents / help for doing so will be appreciated. Also am having issue with finding the frappe module inside the framework (as on external script frappe module not found error came and i dont get external library named frappe too. Please suggest regarding that too)
Solved. Need to pass syntax as
where name is fetched from File List (got form filtering with attached to name field)