K
Kevin F
I have code that searches under the default folder (inbox) but I would
like to modify it to search for everything in that folder with the
exception of one subfolder where I would like it not to search.
my current code is:
from imaplib import *
import getpass
server = IMAP4("webmail.xxxxx.xxxx.edu")
server.login('username', getpass.getpass())
r = server.select("Inbox")
r, data = server.search(None, 'SUBJECT', 'WALLET ENLARGEMENT')
for num in data[0].split():
server.store(num, '+FLAGS', '\\Deleted')
server.expunge()
how do i modify it so that, for example, it searches in inbox but does
not search in a specific subfolder 'opim' under inbox?
like to modify it to search for everything in that folder with the
exception of one subfolder where I would like it not to search.
my current code is:
from imaplib import *
import getpass
server = IMAP4("webmail.xxxxx.xxxx.edu")
server.login('username', getpass.getpass())
r = server.select("Inbox")
r, data = server.search(None, 'SUBJECT', 'WALLET ENLARGEMENT')
for num in data[0].split():
server.store(num, '+FLAGS', '\\Deleted')
server.expunge()
how do i modify it so that, for example, it searches in inbox but does
not search in a specific subfolder 'opim' under inbox?