|
@@ -73,7 +73,7 @@ async def mail_alert(container) -> str | None:
|
|
|
await bot.send_message(chat_id=config['AUTH']['chatid'], text=f'{msg.from_}\nsubj: {msg.subject}\n\n{msg_text}')
|
|
|
else:
|
|
|
await bot.send_message(chat_id=config['AUTH']['chatid'], text=f'{msg.from_}\nsubj: {msg.subject}\n\n{msg.html}')
|
|
|
- container.appendleft(msg.uid)
|
|
|
+ # container.appendleft(msg.uid)
|
|
|
print('message appended', len(container))
|
|
|
except BadRequest:
|
|
|
try:
|
|
@@ -81,11 +81,11 @@ async def mail_alert(container) -> str | None:
|
|
|
await bot.send_message(chat_id=config['AUTH']['chatid'], text=f'{msg.from_}\nsubj: {msg.subject}\n\n{msg_text[:len(msg_text) // 5]}')
|
|
|
else:
|
|
|
await bot.send_message(chat_id=config['AUTH']['chatid'], text=f'{msg.from_}\nsubj: {msg.subject}\n\n{msg.html[:len(msg.html) // 5]}')
|
|
|
- container.appendleft(msg.uid)
|
|
|
+ # container.appendleft(msg.uid)
|
|
|
print('message appended', len(container))
|
|
|
except BadRequest:
|
|
|
await bot.send_message(chat_id=config['AUTH']['chatid'], text=f'{msg.from_}\nsubj: {msg.subject}\n\nMessage is too long')
|
|
|
- container.appendleft(msg.uid)
|
|
|
+ # container.appendleft(msg.uid)
|
|
|
print('message appended', len(container), '!! last message was to long !!')
|
|
|
except Exception:
|
|
|
try:
|
|
@@ -124,7 +124,7 @@ async def mail_alert2(container) -> str | None:
|
|
|
await bot2.send_message(chat_id=config['AUTH']['chatid'], text=msg_text)
|
|
|
else:
|
|
|
await bot2.send_message(chat_id=config['AUTH']['chatid'], text=msg_text)
|
|
|
- container.appendleft(msg.uid)
|
|
|
+ # container.appendleft(msg.uid)
|
|
|
print('message appended', len(container))
|
|
|
except BadRequest:
|
|
|
try:
|
|
@@ -132,11 +132,11 @@ async def mail_alert2(container) -> str | None:
|
|
|
await bot2.send_message(chat_id=config['AUTH']['chatid'], text=msg_text // 5) # noqa E:mypy
|
|
|
else:
|
|
|
await bot2.send_message(chat_id=config['AUTH']['chatid'], text=msg_text // 5) # noqa E:mypy
|
|
|
- container.appendleft(msg.uid)
|
|
|
+ # container.appendleft(msg.uid)
|
|
|
print('message appended', len(container))
|
|
|
except BadRequest:
|
|
|
await bot2.send_message(chat_id=config['AUTH']['chatid'], text=f'Message is too long')
|
|
|
- container.appendleft(msg.uid)
|
|
|
+ # container.appendleft(msg.uid)
|
|
|
print('message appended', len(container), '!! last message was to long !!')
|
|
|
except Exception:
|
|
|
try:
|
|
@@ -176,7 +176,7 @@ async def mail_alert3(container) -> str | None:
|
|
|
await bot.send_message(chat_id=config['AUTH']['chatid'], text=f'{msg.from_}\nsubj: {msg.subject}\n\n{msg_text}')
|
|
|
else:
|
|
|
await bot.send_message(chat_id=config['AUTH']['chatid'], text=f'{msg.from_}\nsubj: {msg.subject}\n\n{msg.html}')
|
|
|
- container.appendleft(msg.uid)
|
|
|
+ # container.appendleft(msg.uid)
|
|
|
print('message appended', len(container))
|
|
|
except BadRequest:
|
|
|
try:
|
|
@@ -184,11 +184,11 @@ async def mail_alert3(container) -> str | None:
|
|
|
await bot.send_message(chat_id=config['AUTH']['chatid'], text=f'{msg.from_}\nsubj: {msg.subject}\n\n{msg_text[:len(msg_text) // 5]}')
|
|
|
else:
|
|
|
await bot.send_message(chat_id=config['AUTH']['chatid'], text=f'{msg.from_}\nsubj: {msg.subject}\n\n{msg.html[:len(msg.html) // 5]}')
|
|
|
- container.appendleft(msg.uid)
|
|
|
+ # container.appendleft(msg.uid)
|
|
|
print('message appended', len(container))
|
|
|
except BadRequest:
|
|
|
await bot.send_message(chat_id=config['AUTH']['chatid'], text=f'{msg.from_}\nsubj: {msg.subject}\n\nMessage is too long')
|
|
|
- container.appendleft(msg.uid)
|
|
|
+ # container.appendleft(msg.uid)
|
|
|
print('message appended', len(container), '!! last message was to long !!')
|
|
|
except Exception:
|
|
|
try:
|