Trying to search/delete for specific user with one letter name, "a", and always changing domains. Some addresses from this spam: Code: a@kragar.imentss.com a@octobertres.com a@cngruel.com Need help please, fixing invalid syntax error. CODE: Code: from imap_tools import MailBox, A with MailBox('imap.mail.yahoo.com').login('name@yahoo.com', 'PWD', 'Bulk') as mailbox: DELETE messages that contains 'a@*.*' in body from Bulk folder mailbox.delete(mailbox.fetch(A(body='a@*.*'))) ERROR: Code: λ python DeleteEmailFiles.py File "C:\Users\Desktop\Desktop\Python Spam Buster\DeleteEmailFiles.py", line 5 DELETE messages that contains 'a@*.*' in body from Bulk folder ^^^^^^^^ SyntaxError: invalid syntax