Send Attachments via Email Alert

Hello,
Is there any possibilities to send attachments on Email Alert?
Means if form has setup for email alert on Submit,
& forms has attachments.
How to send all these attachments along email?

Please answer???

Hi @shahid,

this is only a workaround, but it might help: your message supports Jinja-templating. You could get the attachments and include the links in the notification email. Somehting like this in your email alert message section:

{% set attachments = frappe.get_all('File', filters={'attached_to_doctype': 'yourdoctype', 'attached_to_name': doc.name}, fields=['file_name', 'file_url']) %} 
<ul>
{% for attachment in attachments %}
  <li><a href="{{ attachment.file_url }}">{{ attachment.file_name }}</a></li>
{% endfor %}
</ul>

Adding the attached files to the mail would be a feature request as far as I see it. PR welcome :wink:

Hope this helps.

6 Likes

@lasalesi Thank you so much.