Skip to main content

Forwards mail from mail file to Telegram chat.

Project description

Email to Telegram

A telegram bot that reads a mailbox file and forwards it to a Telegram chat. This can be paired up with a mail server such as Postfix. It can handle forwarding image attachments that are PNG or JPG.

An Ansible role is available: https://github.com/ItsNotGoodName/role-email-to-telegram

Installation

pip3 install .

Configuration

Copy config.def.ini to /etc/email-to-telegram/config.ini and edit it.

You can get the chat_id from the web version of Telegram.
https://stackoverflow.com/a/45577773

Example systemd service file

[Unit]
Description=Starts email-to-telegram-bot
After=network.target

[Service]
User=telegram
ExecStart=email-to-telegram
Restart=on-failure
RestartSec=5s

[Install]
WantedBy=multi-user.target

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

email-to-telegram-1.0.1.tar.gz (5.6 kB view hashes)

Uploaded Source

Built Distribution

email_to_telegram-1.0.1-py3-none-any.whl (7.2 kB view hashes)

Uploaded Python 3

Supported by

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