Print the mail messages only when logging

This commit is contained in:
0dminnimda 2023-04-28 19:31:51 +03:00 committed by GitHub
parent 1941bffc1b
commit 88b4ebba3d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,7 +60,7 @@ class Account:
while True: while True:
sleep(1) sleep(1)
for _ in mail.fetch_inbox(): for _ in mail.fetch_inbox():
print(mail.get_message_content(_["id"])) if logging: print(mail.get_message_content(_["id"]))
mail_token = match(r"(\d){5,6}", mail.get_message_content(_["id"])).group(0) mail_token = match(r"(\d){5,6}", mail.get_message_content(_["id"])).group(0)
if mail_token: if mail_token: