From 376eab0c8301a19bb8d5d01da9ab50bcbb2e1631 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Wed, 2 May 2012 14:56:01 +0530 Subject: [PATCH] fix in auto email id when sender not supplied --- py/webnotes/utils/email_lib/send.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/py/webnotes/utils/email_lib/send.py b/py/webnotes/utils/email_lib/send.py index e1b09c0bdb..7818a5c666 100644 --- a/py/webnotes/utils/email_lib/send.py +++ b/py/webnotes/utils/email_lib/send.py @@ -144,7 +144,8 @@ class EMail: validate the email ids """ if not self.sender: - self.sender = webnotes.conn.get_value('Control Panel',None,'auto_email_id') + self.sender = hasattr(conf, 'auto_email_id') \ + and conf.auto_email_id or 'automail@erpnext.com' from webnotes.utils import validate_email_add # validate ids