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.1.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.1-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: email-to-telegram-1.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 856d27d191e60d7ea79d080b431480fc9b15e98a920aa2593f4d33d26c7772a4
MD5 f46a5f649acc8c92c1a7dc701b74fefc
BLAKE2b-256 63514a7018cf7a87c1c0ef15c1bc9ae71f47f5a69f6af5ce736d17a280d4d55a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: email_to_telegram-1.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0be51875ac521c9cc7dba801df9667a14faa374c16ea2d58b3f3dd9aa2c9907b
MD5 f671a1a72357f61a9b28a9857a1b7581
BLAKE2b-256 58035ab381167ffe53412301bc12739f69501fd266b83a4c376d062205bb9817

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