Skip to main content

Send Mastodon/GoToSocial notifications as emails

Project description

Mastodon Notifications To Email

Send Mastodon/GoToSocial notifications as emails.

The generated emails look similar to the notification emails sent by Mastodon. Some Mastodon-like platform implementations like GoToSocial do not send notifications via email by itself and then this small script comes into play.

It can be used as cronjob or long running process, e.g. with Systemd or in a Docker container.

Installation and setup

mastodon_notifications_to_email requires Python 3.11 or newer. The easiest method is to install directly from pypi using pip:

pip install mastodon-notifications-to-email

Dependencies:

  • Mastodon.py
  • markdownify

Alternatively, you can skip installation and just execute the script:

uv run mastodon_notifications_to_email

Before using mastodon_notifications_to_email, you need to create a configuration file called mastodon_notifications_to_email.conf. mastodon_notifications_to_email will search for the file in the following locations (in that order):

  • ~/.config/mastodon_notifications_to_email.conf
  • mastodon_notifications_to_email.conf (in current working directory)

An example configuration file can be found in the sources or online at https://codeberg.org/eht16/mastodon_notifications_to_email/raw/branch/master/mastodon_notifications_to_email.conf.example.

For details on the configuration options, consider the comments in the example configuration file.

Usage

Run only once (e.g. as cronjob):

mastodon_notifications_to_email

Run in foreground:

mastodon_notifications_to_email -f

Command line options

usage: mastodon_notifications_to_email.py [-h] [-v] [-f] [-c FILE]

options:
  -h, --help         show this help message and exit
  -v, --verbose      Show more log messages (default: False)
  -f, --foreground   Keep running in foreground (default: False)
  -c, --config FILE  configuration file path (default: None)

Disclaimer

Use this tool at your own risk only. There is no warranty at all.

Author

Enrico Tröger enrico.troeger@uvena.de

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mastodon_notifications_to_email-0.1.0.tar.gz (7.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file mastodon_notifications_to_email-0.1.0.tar.gz.

File metadata

File hashes

Hashes for mastodon_notifications_to_email-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e1c78b7d45998249f0506d78681b3d690cb77458c12e85e268c6c8ca86d3eff3
MD5 4fa86a1b49296262db0abb5a3effe749
BLAKE2b-256 fed20d52ac087703c1ced95c3918b2c7963d4e13e0b6f2765b0a979944dd327e

See more details on using hashes here.

File details

Details for the file mastodon_notifications_to_email-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mastodon_notifications_to_email-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ffc883df55115dbad434c7600c7dac2e7de49a24ca1c70ee77b3451f20c6a09e
MD5 c506bad5e98c606d6dbeb22dc4810e74
BLAKE2b-256 6978c93efb027b8e5df32e6648e1fe7051646cb1269fe7577e528667c01d4719

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page