Is there any way to programmatically search GMail, preferably using C#?
For example, I'd like to get all email messages matching the search label:MyLabel from:[email protected], so that I can parse the email bodies as required.
The only thing remotely feasible I've found is the GMail API by Johnvey Hwang, though it doesn't look like it supports searching email and also hasn't been updated in many years either.
In any case, I haven't had much luck in getting it to even connect to my account so far, and was wondering if this even works anymore?
Create an IMAP client, or use a library, to access Gmail and search for e-mail messages. The IMAP protocol explicitly supports searching on the server-side. Make sure IMAP access is enabled for the Gmail account.
Note that in Gmail, labels are treated like IMAP folders.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With