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)