Skip to content

Commit

Permalink
Fix smtp_batch bcc #2437
Browse files Browse the repository at this point in the history
  • Loading branch information
e3rd committed Dec 13, 2023
1 parent 6fb0f9b commit a4c781e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion intelmq/bots/outputs/smtp_batch/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit a4c781e

Please sign in to comment.