Gmail with an ESP32

Hello,

Backstory / Introduction:

i would like to keep away from my phone and PC to focus on my studies. However, i need to receive Emails. So i have decided to build a small device, that would display the numbers of unread mails (or just turn an LED on in case of unread mail), and then display the title of the mail on a display. With this, i can attend emergency Emails. I would like to achieve this, using my knowledge in Python, C, PHP.

Technicallities:

The hardware is not an issue. Displaying and managing the connection are no issues. The connection to Gmail is what i have trouble with. I would really like, if you could help me.

  1. The Gmail Apis are written in Python, Go, ... and not in Micropython. Is there are way to convert the Gmail modules from Python, to Micropython, so that i can use them on the ESP32?

  2. If not, can i achieve my goal using C? (Well, Micropython is written in C, so ...)

  3. Is there any other way to do this?

(I have also posted a similar comment on the Micropython forum. Since the community is small, my topic could take long to be replied. That's why i posted here. My Apologies for the inconveniences)

Thank you.

it seems i can use the Rest API via an Uno or the ESP32. I will try it, when i get the time.

So instead of focussing on your studies you decide to spend a week setting up some email receiving system?

Why not just buy a second hand phone, no SIM card needed, connect to WiFi, only install gmail and use their filters to let you know if some "emergency" e-mail has been received? (the thing of "emergency" is that you generally don't know about it in advance so your biggest challenge is to decide which e-mails will be "emergency" and which not).

On your PC, just blacklist the websites that distract you. You can route them to 0.0.0.0 in your hosts file, for example. Much more efficient than designing a complete system to receive emails.

Even better: don't get distracted too easily. That's probably a much more useful skill to work on than an Arduino GMail reader. :wink:

Pieter

PieterP,

your comments are always useful. Thanks.
I have blacklisted websites, used Sites blockers and time management apps, etc .... I always end up finding a way to bypass these. So, i have decided to remove these devices from my life.

wvmarle,

Thanks for the reply.
"talky-walky phone"? I wanted to keep away from any kind of device in General. It is a nice idea, as i have met (now a friend of mine) a PHD math student using this technic. I will add this as my plan B.

"So instead of focussing on your studies you decide to spend a week setting up some email receiving system?" It will be a project for the summer holidays, in preparation for the next semester. I have already build a device of the same gendre, but displays some stats. What's left would be, to include the receiving feature from Google mail.

"the thing of "emergency" is that you generally don't know about it in advance so your biggest challenge is to decide which e-mails will be "emergency" and which not": Actually, i have thought of that. The solution, i came up with, would be to unsubscribe (newslettes) from useless Sites.

AKJ:
I have blacklisted websites, used Sites blockers and time management apps, etc .... I always end up finding a way to bypass these.

Going to the trouble of Blocking sites and then working ways around the blocks suggests you are addicted.

So what ever scheme you come up with to reduce distractions you will likely waste heaps of time trying to work around because of your addiction.

If I want peace and quiet, I turn my phone off or leave it behind, its really that easy.

Sure there will be the pathetic phantom emergencies when my phone is off, but the world is unlikely to come to an end.

I used to have a phone in my room - you know, the wired version. People sometimes would call at night when I was sleeping, waking me up.

Then there was the mobile phone. I would usually just switch it off at night.

Now the smart phone, doing just that for me. I also don't take it in the bedroom, it's staying in the living room. No risk of midnight disturbances any more.

And emergencies... what is a true emergency, that I really have to be called about, that would be very bad if I knew a couple hours later as I'm sleeping? Can't think of any situation, really.

Installing site blockers and so yourself, then going through lengths to circumvent your own blocks... that's just stupid. Really can't think of a better way to describe that. Well, pathetic maybe.