I have a gmail account 'x...@gmail.com' which subscripted python maillist. I want to delete any emails which is sent to python-list@python.org .

|import  imaplib
user="xxx"
password="yyyyyy"
con=imaplib.IMAP4_SSL('imap.gmail.com')
con.login(user,password)
con.select('[Gmail]/&YkBnCZCuTvY-')
type,  data=  con.search(None,  "All")
type1,  data1=  con.search(None,  '(TO "python-list@python.org")')
ids_all=  set(data[0].split())
ids1=set(data1[0].split())

ids_deleted=set(ids_all-ids1)

for  numin  ids_deleted:
   con.store(num,  '+FLAGS',  '\\Deleted')


con.expunge()|

When i open my gmail with thunderbird ,the emails which are sent to python-list@python.org are still in my gmail,Why i can't delete them?

-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to