Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add support for sending to multiple recipients via sendmail #797

Merged
merged 7 commits into from
Mar 12, 2024
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ The format mostly follows [Keep a Changelog](http://keepachangelog.com/en/1.0.0/

### Fixed

- Fix multiple recipients for sendmail reporter (#797)
monperrus marked this conversation as resolved.
Show resolved Hide resolved
- 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)
Expand Down
16 changes: 15 additions & 1 deletion docs/source/reporters.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -290,6 +290,20 @@ 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.
monperrus marked this conversation as resolved.
Show resolved Hide resolved

.. code:: yaml

report:
email:
enabled: true
from: '[email protected]'
thp marked this conversation as resolved.
Show resolved Hide resolved
method: sendmail


E-Mail via GMail SMTP
---------------------

Expand Down
2 changes: 1 addition & 1 deletion lib/urlwatch/mailer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading