Skip to main content

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

Metadata

Release files for mastodon-notifications-to-email 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mastodon-notifications-to-email 0.1.0
File Size Uploaded
mastodon_notifications_to_email-0.1.0.tar.gz 7.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mastodon-notifications-to-email 0.1.0
File Interpreter ABI Platform
mastodon_notifications_to_email-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 14.6 kB

Release files / mastodon_notifications_to_email-0.1.0.tar.gz

Download URL mastodon_notifications_to_email-0.1.0.tar.gz
Size 7.4 kB
Tags Source
SHA-256 checksum
How to use checksums
e1c78b7d45998249f0506d78681b3d690cb77458c12e85e268c6c8ca86d3eff3
BLAKE2b-256 checksum
How to use checksums
fed20d52ac087703c1ced95c3918b2c7963d4e13e0b6f2765b0a979944dd327e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.7

Release files / mastodon_notifications_to_email-0.1.0-py3-none-any.whl

Download URL mastodon_notifications_to_email-0.1.0-py3-none-any.whl
Size 7.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ffc883df55115dbad434c7600c7dac2e7de49a24ca1c70ee77b3451f20c6a09e
BLAKE2b-256 checksum
How to use checksums
6978c93efb027b8e5df32e6648e1fe7051646cb1269fe7577e528667c01d4719
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.7.7

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page