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.0.tar.gz (5.7 kB view details)

Uploaded Source

Built Distribution

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

email_to_telegram-1.1.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file email-to-telegram-1.1.0.tar.gz.

File metadata

  • Download URL: email-to-telegram-1.1.0.tar.gz
  • Upload date:
  • Size: 5.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for email-to-telegram-1.1.0.tar.gz
Algorithm Hash digest
SHA256 9ff11f5327f888768d29fc3b620d50a20481364138abad32ddef494d4544f4ad
MD5 aa3aaed9665378413b5b87e7e23d155e
BLAKE2b-256 5bf4a0c424209c881ac8492e322f5125c92346bc94b29c5c6469933eedf16191

See more details on using hashes here.

File details

Details for the file email_to_telegram-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: email_to_telegram-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.5

File hashes

Hashes for email_to_telegram-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1904ff4f7a342f03a4ae3ed7117fe36af629b4d92582234341cbe4f91f2d560f
MD5 80bea799d57bf77799e04c5c74e76bd7
BLAKE2b-256 6484ff2438fcf563347631a834843615f7bb38932acd01e0e2b931be71e6f4ac

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