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

Uploaded Python 3

File details

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

File metadata

  • Download URL: email-to-telegram-1.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 c08011a63f9464cf0c397cc9fd9bf4647c52e8596367c9b9aa76e1c3f94d3468
MD5 8b72ea7ef0b7643632243ce9f1753a3b
BLAKE2b-256 c889ec5e47664f115b09153908eb7f02751310e0b5cfd24ee38ce770ee971c97

See more details on using hashes here.

File details

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

File metadata

  • Download URL: email_to_telegram-1.0.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6294a8a2cb5f91ecfb900be419764f8e9c92c1e1e18db5561f1edaecd8d29b89
MD5 8c00d90820bae53c0319978b248d11d2
BLAKE2b-256 280db0228b91287305ebcd18a4cbc829e4819b5a3b9afd4a624388a8096c621d

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