diff --git a/CHANGELOG.md b/CHANGELOG.md index 99436961..8b119a74 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,6 +18,7 @@ The format mostly follows [Keep a Changelog](http://keepachangelog.com/en/1.0.0/ ### Fixed +- `email` reporter: Allow multiple recipients for `sendmail` method (#797, by monperrus) - Fix documentation for watching Github tags and releases, again (#723) - Fix `--test-reporter` command-line option so `separate` configuration option is no longer ignored when sending test notifications (#772, by marunjar) - Fix line height and dark mode regression (#774 reported by kongomongo, PRs #777 and #778 by trevorshannon) diff --git a/docs/source/reporters.rst b/docs/source/reporters.rst index 4da683f0..5db20dfa 100644 --- a/docs/source/reporters.rst +++ b/docs/source/reporters.rst @@ -61,7 +61,7 @@ The list of built-in reporters can be retrieved using:: At the moment, the following reporters are built-in: - **discord**: Send a message to a Discord channel -- **email**: Send summary via e-mail / SMTP +- **email**: Send summary via e-mail / SMTP / sendmail - **ifttt**: Send summary via IFTTT - **mailgun**: Send e-mail via the Mailgun service - **matrix**: Send a message to a room using the Matrix protocol @@ -290,6 +290,21 @@ public Matrix room, as the messages quickly become noisy: minimal: true enabled: true +E-Mail via sendmail +--------------------- + +You can send email via the system's ``sendmail`` command provided by the MTA. You need to set ``method: sendmail`` in the config file: + +.. code:: yaml + + report: + email: + enabled: true + from: 'postmaster@example.com' + to: 'recipient@bar.com' + method: sendmail + + E-Mail via GMail SMTP --------------------- diff --git a/lib/urlwatch/mailer.py b/lib/urlwatch/mailer.py index 2dc74cc8..3027e3fd 100644 --- a/lib/urlwatch/mailer.py +++ b/lib/urlwatch/mailer.py @@ -112,7 +112,7 @@ def __init__(self, sendmail_path): self.sendmail_path = sendmail_path def send(self, msg): - p = subprocess.Popen([self.sendmail_path, '-oi', '-f', msg['From'], msg['To']], + p = subprocess.Popen([self.sendmail_path, '-oi', '-f', msg['From']] + msg['To'].split(','), stdin=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)