charlierguo / gmail

A Pythonic interface for Google Mail
MIT License
1.77k stars 386 forks source link

Deleting an email accessed via a label search only removes the tag #46

Open girlpunk opened 10 years ago

girlpunk commented 10 years ago

When an email is accessed as part of a label search, attempting to delete the email only removes the label from the email, but does not delete it.

An example for an email with the tags Inbox and Travel:

for email in g.label('Travel').mail()[0:1]:
    email.fetch()
    process(email.body)
    email.delete

This results in an email that still has the Inbox tag