BLOCK:ImapLogin
email = “[email]”
password = “[pass]”
ENDBLOCK #HERE
BLOCK:ImapSearchMails
field1 = To
text1 = $“@[email]”
field2 = Subject
text2 = “Account Verification”
deliveredAfter = 60
SAFE
=> VAR @imapSearchMailsOutput
ENDBLOCK
IF STRINGKEY @imapSearchMailsOutput EqualTo “0 mails matched the search”
JUMP #HERE
END
which doesn’t return an error but doesn’t work it doesn’t say it matched the string or anything and just keeps going which causes it to end with STATUS: ERROR
Well I tried detecting the “0 mails matched the search” but it doesn’t detect it and just keeps going not sure why shouldn’t it be a data.ERROR if it doesn’t find any emails matching the search ?
EDIT: IGNORE THE OTHER EDIT that did not work lmao and just always matches key 0 EqualTo 0 no matter if there is a mail id found
Well it still creates a list as output with the IDs of the searched mails. So you can make a keycheck on the length of the list (where list is the name of the list variable that the imap search block uses as output). Use an int key not a string key in this case, it’s better!