mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
49_Arlo.pm: delete old 2FA mails before login
git-svn-id: https://svn.fhem.de/fhem/trunk@28062 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
abc7491b44
commit
1680e2cb17
@ -165,6 +165,9 @@ class TfaMailCheck:
|
|||||||
res, ids = self._imap.search(None, "FROM", "do_not_reply@arlo.com")
|
res, ids = self._imap.search(None, "FROM", "do_not_reply@arlo.com")
|
||||||
for msg_id in ids[0].split():
|
for msg_id in ids[0].split():
|
||||||
self._determine_code_and_delete_mail(msg_id)
|
self._determine_code_and_delete_mail(msg_id)
|
||||||
|
if res.lower() == "ok" and len(ids) > 0:
|
||||||
|
self._imap.close()
|
||||||
|
res, status = self._imap.select()
|
||||||
if res.lower() != "ok":
|
if res.lower() != "ok":
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user