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.0.2.tar.gz (5.6 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.0.2-py3-none-any.whl (7.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: email-to-telegram-1.0.2.tar.gz
  • Upload date:
  • Size: 5.6 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.0.2.tar.gz
Algorithm Hash digest
SHA256 0fdb70aef453a90b4068f0e9419c60854e766ba64fa4fdf714a7f639a0b1e64e
MD5 e0c6b3074593cf37fd05ac7be3f9b2ba
BLAKE2b-256 00f223d517177f93873466b50be639287e8daac1c8e33e8d4274413773b542ce

See more details on using hashes here.

File details

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

File metadata

  • Download URL: email_to_telegram-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.2 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.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 845eabe0c6d61c329a7b816e7b81fc2044db0d3e7cda46b5e5094077f4272d36
MD5 cd2a26d0b033fc41cb52453e2e0f6b59
BLAKE2b-256 674b7ebb90f8ddd823764f490fc2231ec1e383222f9cbf2901e43cfeea2b5786

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