fix: handle emails sent from console

This commit is contained in:
Ankush Menat 2023-11-04 14:30:21 +05:30
parent 4255a0ec46
commit 3211a77dc8

View file

@ -108,6 +108,11 @@ class SMTPServer:
frappe.request.after_response.add(self.quit)
elif frappe.job:
frappe.job.after_job.add(self.quit)
else:
# Console?
import atexit
atexit.register(self.quit)
def is_session_active(self):
if self._session: