Commit be80f840 authored by kaiyou's avatar kaiyou

Add a pretty message for mail monitoring

parent b7ad2573
Pipeline #158 passed with stage
in 1 minute and 3 seconds
......@@ -62,6 +62,9 @@ def send_then_receive(context, account_from, account_to):
for uid in data[0].split():
client.uid("store", uid, "+FLAGS", "(\\Seen)")
result["up"] = True
if not result["up"]:
domain = account_to["username"].split("@")[1]
result["message"] = f"message not delivered to {domain}"
client.logout()
except Exception as error:
result = {"up": False, "message": str(error)}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment