Skip to content

Commit

Permalink
feat: set sender_name_field in reference doc
Browse files Browse the repository at this point in the history
(cherry picked from commit 1dca311)
  • Loading branch information
barredterra authored and mergify[bot] committed Dec 4, 2023
1 parent 7722d76 commit 5de64d8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frappe/email/receive.py
Original file line number Diff line number Diff line change
Expand Up @@ -892,6 +892,9 @@ def _create_reference_document(self, doctype):
if email_fields.sender_field:
parent.set(email_fields.sender_field, frappe.as_unicode(self.from_email))

if email_fields.sender_name_field:
parent.set(email_fields.sender_name_field, frappe.as_unicode(self.from_real_name))

parent.flags.ignore_mandatory = True

try:
Expand Down Expand Up @@ -935,7 +938,7 @@ def get_email_fields(doctype):
"""Returns Email related fields of a doctype."""
fields = frappe._dict()

email_fields = ["subject_field", "sender_field"]
email_fields = ["subject_field", "sender_field", "sender_name_field"]
meta = frappe.get_meta(doctype)

for field in email_fields:
Expand Down

0 comments on commit 5de64d8

Please sign in to comment.