From ac599d2bf973a7233dd7ae37ff7940f7598b9ea7 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Fri, 15 Feb 2013 17:28:46 +0530 Subject: [PATCH] added mute_emails in conf --- webnotes/utils/email_lib/__init__.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/webnotes/utils/email_lib/__init__.py b/webnotes/utils/email_lib/__init__.py index fde49c873e..40a005e579 100644 --- a/webnotes/utils/email_lib/__init__.py +++ b/webnotes/utils/email_lib/__init__.py @@ -21,11 +21,11 @@ # from __future__ import unicode_literals -import webnotes +import webnotes, conf def sendmail_md(recipients, sender=None, msg=None, subject=None): """send markdown email""" - if webnotes.mute_emails: + if webnotes.mute_emails or getattr(conf, "mute_emails", False): return import markdown2 @@ -33,7 +33,7 @@ def sendmail_md(recipients, sender=None, msg=None, subject=None): def sendmail(recipients, sender='', msg='', subject='[No Subject]'): """send an html email as multipart with attachments and all""" - if webnotes.mute_emails: + if webnotes.mute_emails or getattr(conf, "mute_emails", False): return from webnotes.utils.email_lib.smtp import get_email