How to retrieve IMAP mail filtered with Subject?

I would like to get the Emails based on the Subject excludes certain keywords

i referred this document

its working fine for “SUBJECT Welcome” which returns only Email with Subject contains “Weclome” but now i want the opposite… say I want to exclude all the Emails with “Welcome” its giving error…

I tried “SUBJECT NOT Welcome” its giving Error "The IMAP Server replied to the SEARCH Command with a BAD response: The specified message set is invalid.

Any suggestions?


Try this


Wow… it works great… Thank you Varun Kumar…

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.