Created
December 28, 2020 17:50
-
-
Save israel-dryer/3cda283314dafde43e13872066db8f10 to your computer and use it in GitHub Desktop.
example of find a word in a subject line then performing action; then stopping.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
search_term = "product" | |
for message in inbox.Items: | |
if search_term in message.Subject: | |
do_something() | |
break # this will break out of the loop once the item is found |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment