Enhancement: use friendly file names when emailing documents (#11055)

This commit is contained in:
Jan Kleine
2025-10-15 19:10:25 +02:00
committed by GitHub
parent 39c429bb87
commit 340754d865
5 changed files with 142 additions and 29 deletions

View File

@@ -1164,12 +1164,13 @@ def run_workflows(
try:
attachments = []
if action.email.include_document and original_file:
attachments = [(original_file, document.mime_type)]
attachments = [document]
n_messages = send_email(
subject=subject,
body=body,
to=action.email.to.split(","),
attachments=attachments,
use_archive=False,
)
logger.debug(
f"Sent {n_messages} notification email(s) to {action.email.to}",