From ffcbfebfd6c079376ab08ae67d755b34b5182fca Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 16 Jan 2013 12:19:27 +0530 Subject: [PATCH] added automatic lead creation for sales email id --- core/doctype/communication/communication.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/doctype/communication/communication.py b/core/doctype/communication/communication.py index 37f995edc9..efe86d78e9 100644 --- a/core/doctype/communication/communication.py +++ b/core/doctype/communication/communication.py @@ -75,6 +75,9 @@ def send_comm_email(d, name, sent_via=None, print_html=None, attachments='[]', s if hasattr(sent_via, "get_content"): d.content = sent_via.get_content(d) + if not d.sender: + d.sender = webnotes.session.user + from webnotes.utils.email_lib.smtp import get_email mail = get_email(d.recipients, sender=d.sender, subject=d.subject, msg=d.content)