Hi Ben -


On Tue, Jul 5, 2022 at 7:36 PM Ben Pracht <ben.pracht@gmail.com> wrote:
Hi,
This may seem a bit unusual, but I like the parsing capabilities of XQuery and I'd like to use it for my email. I'd like to have BaseX log into my IMAP server, fetch emails and put each email as a separate XML document. I'm willing to have it ignore attachments if necessary. Then, I'd like to query my email using normal BaseX XQuery. This isn't for normal emails, but I wanted to be able to query it for automated emails and for one-off type queries.

Oh, to make things more difficult, I'm using GMail, so the login just got even more difficult. 
Any suggestions?

An(other!) idea I've been kicking around (and wondering about) but not testing/exploring/trying: integrating the Google OAuth2 api client(s) [1,2]. I don't know how it would work (or fit together), but that seems like a reasonable place to start.


Thanks,
Ben

I hope this is helpful.
Best,
Bridger

[1] https://developers.google.com/api-client-library/java/google-api-java-client/oauth2
[2] https://github.com/googleapis/google-auth-library-java

 
Best Regards,
Ben Pracht
919.809.2439
ben.pracht@gmail.com