KostyaEsmukov / smtp_to_telegram

A small program that listens for SMTP and sends all incoming Email messages to Telegram
MIT License
327 stars 80 forks source link

Long text messages, sending fails #6

Closed alecpetrosky closed 3 years ago

alecpetrosky commented 4 years ago

Is the an option to trim automatically messages which exceed maximum length allowed by Telegram instead of fail? I guess the most common use case scenario for smtp_to_telegram is sending automated notifications from the server. Often, we aren't in control of message length. And IMHO it's better to trim message than discard it.

KostyaEsmukov commented 4 years ago

There's no such option at this moment. I never faced such a problem, but I think this is a good idea, so a PR would be welcome.

But I think instead of trimming the message it would be better to split it to multiple smaller ones.