Skip to main content

A telegram replacement for sendmail.

Project description

sendtelegram

Current version: 0.2.0

A Telegram replacement for sendmail.

sendtelegram uses a Telegram bot to send messages to a specific user. It reads from stdin, splits the input text into messages of at most MAX_MSG_LEN characters (default: 4096) and send them using the Telegram API.

sendtelegram adheres to the 12 factor principles to manage settings.

It requires two environment variables:

  • SENDTELEGRAM_API_TOKEN: the Telegram API token.
  • SENDTELEGRAM_CHAT_ID: id of the chat between the bot and the target user.

Usage

usage: sendtelegram [-h] [-m MAX_MSG_LEN]

optional arguments:
  -h, --help            show this help message and exit
  -m MAX_MSG_LEN, --max-msg-len MAX_MSG_LEN
                        Max number of characters of a Telegram message (default: 4096)

Examples

Sending a text file as a telegram message:

cat README.md | sendtelegram

Author

Project details


Release history Release notifications

This version

0.2.0

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for sendtelegram, version 0.2.0
Filename, size File type Python version Upload date Hashes
Filename, size sendtelegram-0.2.0-py3-none-any.whl (4.1 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size sendtelegram-0.2.0.tar.gz (3.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page