When a "sender" is set for a Process Statement of Account doc, the emails are not sent and an exception is thrown. This is happening because the sender field is of type Link, but here the value of the field is used as an email address.
The exception is attached (email redacted). The sender field can be configured when the Enable Auto Email is set.
Relevant log output / Stack trace / Full Error Message.
Invalid email address Sender: Matthew Borg Seychell, Recipients: ***@gmail.com,
Traceback: Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/email/doctype/email_queue/email_queue.py", line 745, in as_dict
mail_to_string = cstr(mail.as_string())
^^^^^^^^^^^^^^^^
File "/home/frappe/frappe-bench/apps/frappe/frappe/email/email_body.py", line 338, in as_string
self.validate()
File "/home/frappe/frappe-bench/apps/frappe/frappe/email/email_body.py", line 262, in validate
validate_email_address(strip(self.sender), True)
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/__init__.py", line 196, in validate_email_address
email = _check(e.strip())
^^^^^^^^^^^^^^^^^
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/__init__.py", line 186, in _check
frappe.throw(
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 593, in throw
msgprint(
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 565, in msgprint
_raise_exception()
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 516, in _raise_exception
raise exc
frappe.exceptions.InvalidEmailAddressError: Matthew Borg Seychell is not a valid Email Address
Information about bug
When a "sender" is set for a Process Statement of Account doc, the emails are not sent and an exception is thrown. This is happening because the
sender
field is of typeLink
, but here the value of the field is used as an email address.The exception is attached (email redacted). The
sender
field can be configured when theEnable Auto Email
is set.Module
accounts
Version
Frappe version: v15.16.1 Erpnext version: v15.15.0
Installation method
docker
Relevant log output / Stack trace / Full Error Message.