It could be the attachment? I check the Error Log List and found this:
Traceback (most recent call last):
File "/home/frappe/frappe-bench/apps/frappe/frappe/utils/background_jobs.py", line 100, in execute_job
method(**kwargs)
File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/communication/email.py", line 461, in sendmail
communication._notify(print_html=print_html, print_format=print_format, attachments=attachments,
File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/communication/communication.py", line 211, in _notify
_notify(self, print_html, print_format, attachments, recipients, cc, bcc)
File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/communication/email.py", line 151, in _notify
prepare_to_notify(doc, print_html, print_format, attachments)
File "/home/frappe/frappe-bench/apps/frappe/frappe/core/doctype/communication/email.py", line 262, in prepare_to_notify
frappe.throw(_("Unable to find attachment {0}").format(a))
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 424, in throw
msgprint(msg, raise_exception=exc, title=title, indicator='red', is_minimizable=is_minimizable, wide=wide, as_list=as_list)
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 403, in msgprint
_raise_exception()
File "/home/frappe/frappe-bench/apps/frappe/frappe/__init__.py", line 357, in _raise_exception
raise raise_exception(msg)
frappe.exceptions.ValidationError: Unable to find attachment f8f88a193d
Update: YES this is the cause.
But why did this happen?
The attachment file is not shared to the regular user. But the file itself is not private, and user already has access to the “parent” document, which is the Purchase Invoice.
I’d expect that all the files attached there, automatically is accessible by these users.
Is this a bug or designed feature?
If it works as designed, what is the best way to do this, without sharing explicitly each attachment to the “email sender” user?
Also, the bug is, if the attachment privilege is denied, then error should be shown interactively right when Sending the email (and thus, cannot continue). Instead of “pretending” the email is sent and added to Activities and never sent.
Related issues: