Frappe.sendmail not working

Hi,

When I’m calling frappe.sendmail through a function called in doc_events of hooks, an error is occuring.
It’s showing Internal Server Error in response.

Is there any trace in Error Log?