Skip to main content

Telegram bot that reads a mail file and forwards to Telegram chat

Project description

Email to Telegram

Telegram bot that reads a mail file and forwards to Telegram chat. It has to 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/ansible-role-email-to-telegram

Installation

pip install email-to-telegram

Configuration

Copy and edit config.def.ini to one of the following paths.

  • /etc/email-to-telegram/config.ini
  • config.ini

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
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.1.2.tar.gz (6.6 kB view hashes)

Uploaded Source

Built Distribution

email_to_telegram-1.1.2-py3-none-any.whl (8.6 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