diff --git a/frappe/email/doctype/email_account/test_mails/incoming-4.raw b/frappe/email/doctype/email_account/test_mails/incoming-4.raw index 1854afb554..99374885cb 100644 --- a/frappe/email/doctype/email_account/test_mails/incoming-4.raw +++ b/frappe/email/doctype/email_account/test_mails/incoming-4.raw @@ -8,7 +8,7 @@ Received: from 23-59-23-10.perm.iinet.net.au ([23.59.23.10]:56280) for test_receiver@example.com; Tue, 09 Feb 2016 14:53:22 +0800 From: To: -Subject: test email +Subject: test email Date: Tue, 9 Feb 2016 14:53:13 +0800 Message-ID: <000001d16306$8b9e5c60$a2db1520$@ia-group.com.au> MIME-Version: 1.0 @@ -30,7 +30,7 @@ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit -4th test email +4th test email ------=_NextPart_001_0006_01D16349.99C37120 diff --git a/frappe/email/queue.py b/frappe/email/queue.py index 15d7d740b4..ecfc8c14d9 100755 --- a/frappe/email/queue.py +++ b/frappe/email/queue.py @@ -292,11 +292,10 @@ def make_cache_queue(): def send_one(email, smtpserver=None, auto_commit=True, now=False): '''Send Email Queue with given smtpserver''' - if frappe.are_emails_muted(): + if frappe.are_emails_muted() or frappe.flags.in_test: frappe.msgprint(_("Emails are muted")) return - email = frappe.db.sql('''select name, status, communication, message, sender, recipient, reference_doctype from `tabEmail Queue` where name=%s for update''', email, as_dict=True)[0]