From 019f6b61944880541d2e6f3ae0f3f705d8ed9244 Mon Sep 17 00:00:00 2001 From: fishnux Date: Thu, 15 Feb 2024 05:36:25 +0000 Subject: [PATCH] Add from_email to template Fixes /~https://github.com/jamesridgway/attachment-downloader/issues/50 --- bin/attachment-downloader | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/attachment-downloader b/bin/attachment-downloader index 51486cb..654d81e 100755 --- a/bin/attachment-downloader +++ b/bin/attachment-downloader @@ -81,7 +81,8 @@ def process_message(filename_template, options, message): subject=subject, message_id=message.message_id, date=parsed_message_date, - folder=folder) + folder=folder, + from_email=message.sent_from[0]['email']) download_path = os.path.join(options.download_folder, download_filename) os.makedirs(os.path.dirname(os.path.abspath(download_path)), exist_ok=True)