fix in auto email id when sender not supplied

This commit is contained in:
Anand Doshi 2012-05-02 14:56:01 +05:30
parent b9e049edd6
commit 376eab0c83

View file

@ -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