diff --git a/frappe/email/queue.py b/frappe/email/queue.py index 4a0a34c76e..62b0d9ea3f 100755 --- a/frappe/email/queue.py +++ b/frappe/email/queue.py @@ -6,7 +6,7 @@ import frappe import sys from six.moves import html_parser as HTMLParser import smtplib, quopri, json -from frappe import msgprint, _, safe_decode +from frappe import msgprint, _, safe_decode, safe_encode from frappe.email.smtp import SMTPServer, get_outgoing_email_account from frappe.email.email_body import get_email, get_formatted_html, add_attachment from frappe.utils.verified_command import get_signed_params, verify_request @@ -563,7 +563,7 @@ def prepare_message(email, recipient, recipients_list): print_format_file.update({"parent": message}) add_attachment(**print_format_file) - return message.as_string() + return safe_encode(message.as_string()) def clear_outbox(): """Remove low priority older than 31 days in Outbox and expire mails not sent for 7 days.