diff --git a/frappe/email/__init__.py b/frappe/email/__init__.py index c73ae65f04..44bb362f8d 100644 --- a/frappe/email/__init__.py +++ b/frappe/email/__init__.py @@ -243,6 +243,6 @@ def sendmail( # build email queue and send the email if send_now is True. q = builder.process(send_now=False) - if now: + if now and q: frappe.db.after_commit.add(q.send) return q