From a4c781e208cb525ee15b0233a6c43088ab428148 Mon Sep 17 00:00:00 2001 From: Edvard Rejthar Date: Wed, 13 Dec 2023 11:43:16 +0100 Subject: [PATCH] Fix smtp_batch bcc #2437 --- CHANGELOG.md | 2 ++ intelmq/bots/outputs/smtp_batch/output.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 38a140f6e..2c9fc2262 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -88,6 +88,8 @@ - Minor fixes/improvements and some refactoring (see also above: *Core*...). - `intelmq.bots.outputs.stomp.output` (PR#2423 by Kamil Mankowski): - Try to reconnect on `NotConnectedException`. +- `intelmq.bots.outputs.smtp_batch.output` (PR #2439 by Edvard Rejthar): + - Fix ability to send with the default `bcc` ### Documentation - Add a readthedocs configuration file to fix the build fail (PR#2403 by Sebastian Wagner). diff --git a/intelmq/bots/outputs/smtp_batch/output.py b/intelmq/bots/outputs/smtp_batch/output.py index 5d2779f47..2e04f7e1d 100644 --- a/intelmq/bots/outputs/smtp_batch/output.py +++ b/intelmq/bots/outputs/smtp_batch/output.py @@ -338,7 +338,7 @@ def build_mail(self, mail, send=False, override_to=None): return (Envelope(text) .attach(path=mail.path, name=attachment_name + '.zip') .from_(email_from).to(email_to) - .bcc([] if intended_to else getattr(self, 'bcc', [])) + .bcc(not intended_to and self.bcc or []) .subject(subject) .smtp(self.smtp_server) .signature(self.gpg_key, self.gpg_pass)