I was able to process my Gmail with a simple python script that accessed email via SMTP (using smtplib, I think it was) a long time ago, it can't be too hard.
At the time I was only experimenting with it for an idea I never fully realized, creating a system for video games to automatically play games asynchronously using email instead of a server (also you could see it was your turn again just by email notifications), thus being able to survive in perpetuity as long as SMTP remained a thing, but I could see using it to do what you're suggesting as well.
At the time I was only experimenting with it for an idea I never fully realized, creating a system for video games to automatically play games asynchronously using email instead of a server (also you could see it was your turn again just by email notifications), thus being able to survive in perpetuity as long as SMTP remained a thing, but I could see using it to do what you're suggesting as well.