Wrapper on the email module. Email object represents emails to be sent to the client.
Also provides a clean way to add binary FileData
attachments
Also sets all messages as multipart/alternative for cleaner reading in text-only clients
__init__ (self, sender=, recipients=(), subject=, alternative=0, reply_to=None, cc=())
No docs
add_attachment (self, fname, fcontent, content_type=None)
add attachment
add_pdf_attachment (self, name, html, options=None)
No docs
validate, build message and convert to string
attach a file from the FileData
table
No docs
build into msg_root
set_html (self, message, text_content=None, footer=None, print_html=None, formatted=None)
Attach message in the html portion of multipart/alternative
return html2text
set_message (self, message, mime_type=text/html, as_attachment=0, filename=attachment.html)
Append the message with MIME content to the root node (as attachment)
set_message_id (self, message_id)
No docs
No docs
Attach message in the text portion of multipart/alternative
validate the email ids
frappe.email.email_body.get_email (recipients, sender=, msg=, subject=[No Subject], text_content=None, footer=None, print_html=None, formatted=None, attachments=None, content=None, reply_to=None, cc=())
send an html email as multipart with attachments and all
frappe.email.email_body.get_footer (email_account, footer=None)
append a footer (signature)
frappe.email.email_body.get_formatted_html (subject, message, footer=None, print_html=None)
No docs
frappe.email.email_body.get_signature (email_account)
No docs