Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* fix: Bail if no SMTP acccount can be found Currently we give this weird error instead of just saying no outgoing email account is configured. ``` AttributeError: 'NoneType' object has no attribute 'get_smtp_server' File "frappe/email/queue.py", line 154, in flush email_queue.send() File "frappe/email/doctype/email_queue/email_queue.py", line 160, in send with SendMailContext(self, smtp_server_instance) as ctx: File "frappe/email/doctype/email_queue/email_queue.py", line 236, in __init__ self.smtp_server: SMTPServer = smtp_server_instance or self.email_account_doc.get_smtp_server() ``` (cherry picked from commit 78665d9) * fix: Fetch SMTP server inside context Currently if smtp server creation fails email queue is endlessly retried. It should just fail if there's no outgoing account. (cherry picked from commit dae99eb) --------- Co-authored-by: Ankush Menat <ankush@frappe.io>
- Loading branch information