ERPNext Foundation ERPNext Cloud User Manual Blog Discuss Frappé* Donate

Unable to send Email gives error 417 Expectation failed


#1

frappe.call({
method: “frappe.core.doctype.communication.email.make”,
args: {
recipients: "email1@email.com,email2@email.com,email3@email.com",
sender:"alerts@email.com",
sender_full_name:“Sender Name”,
content: email_html,
subject: subject,
doctype: ‘RX’,
name: cur_frm.doc.name,
send_email: 1,
communication_medium: “Email”,
attachments: attachment
},
async: false,
callback: function® {
}
});

Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/app.py", line 61, in application
response = frappe.handler.handle()
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 21, in handle
data = execute_cmd(cmd)
File "/home/frappe/frappe-bench/apps/frappe/frappe/handler.py", line 56, in execute_cmd
return frappe.call(method, **frappe.form_dict)
File "/home/frappe/frappe-bench/apps/frappe/frappe/init.py", line 1026, in call
return fn(*args, **newargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/communication/email.py", line 75, in make
comm.insert(ignore_permissions=True)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 249, in insert
self.run_post_save_methods()
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 905, in run_post_save_methods
self.run_method("on_update")
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 772, in run_method
out = Document.hook(fn)(self, *args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1048, in composer
return composed(self, method, *args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 1031, in runner
add_to_return_value(self, fn(self, *args, **kwargs))
File "/home/frappe/frappe-bench/apps/frappe/frappe/model/document.py", line 766, in <lambda>
fn = lambda self, *args, **kwargs: getattr(self, method)(*args, **kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/communication/communication.py", line 117, in on_update
update_comment_in_doc(self)
File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/communication/comment.py", line 71, in update_comment_in_doc
update_comments_in_parent(doc.reference_doctype, doc.reference_name, _comments)
File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/communication/comment.py", line 150, in update_comments_in_parent
raise ImplicitCommitError
ImplicitCommitError