From 4924c96380444b5a307bacc4519c621d2ce89bf5 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Mon, 14 May 2012 18:02:21 +0530 Subject: [PATCH] sync support emails only when sync_support_mails is set to 1 --- erpnext/support/doctype/support_ticket/__init__.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/erpnext/support/doctype/support_ticket/__init__.py b/erpnext/support/doctype/support_ticket/__init__.py index d74580854e..ed42d2b9ec 100644 --- a/erpnext/support/doctype/support_ticket/__init__.py +++ b/erpnext/support/doctype/support_ticket/__init__.py @@ -171,5 +171,6 @@ def get_support_mails(): """ Gets new emails from support inbox and updates / creates Support Ticket records """ - SupportMailbox().get_messages() - + import webnotes + if webnotes.conn.get_value('Email Settings', None, 'sync_support_mails'): + SupportMailbox().get_messages() \ No newline at end of file