Easy Unread Email Notifier

Introduction: Easy Unread Email Notifier

About: Hobbyist

Hi All, welcome to yet another Instructable.With the current situation of working from home, I am facing some challenges because I received emails from my Company Time to time.Then I was thinking to make a Desk Notifier which will notify me about my new email and finally I made it. I used the coolest single board Nodemcu to bring the thing in reality. This Desk Notifier will notify you about your new Gmail and will show you the total number of new emails.

Supplies

1X Nextion 3.2 TFT Display

1X Node MCU

1X Red LED

1X 5V 1000mA Power Supply

1X 220 Ohm Resistor

1X AMS 1117 3.3V Regulator

Jumper Wires

Hot Glue Gun

Wire Cutter

Cardboard Box

Step 1: Showing the Number of Unread Emails

To communicate with Google's Gmail servers, we have to establish a secure connection to the server and send a secure HTTPS request with our email address and password. Gmail will then respond with an XML document containing all kinds of information, like (parts of) your most recent messages and the number of unread emails.

To make sure we don't send our Google password to a malicious server, we have to check the server's identity, using the SHA-1 fingerprint of the SSL certificate. This is a unique sequence of hexadecimal characters that identifies the server.

Step 2: Hardware & Wiring

I included a couple of photos above

  • 220 ohm resistor between the LED and D3 pins Wire between GND.
  • The TX pin is connected to the RX pin of NEXTION Display.
  • The RX pin is connected to the TX pin of NEXTION Display.

Step 3: Set Up Nextion Display

Paste this .tft file in an empty micro sd card. We then place this SD card in the sd card slot at the back of the Nextion Display.If we now power up the display, it will update the code that the display is executing. If we now remove the SD card and power up the display one more time, the new graphical user interface will appear.

Step 4: Code & How It Works

Ok, so here's what's actually going on.

Someone sends you an email. Gmail sees it, and starts your Nodemcu program.The Nodemcu receives the HTTP Response, and that is what causes the LED light bulb to turn on. and also displays the count of unread emails.

Step 5: Required Files

Step 6: Encoding Your Login Credentials

To get access to the feed, you have to enter your email address and password. You can't send them as plain text, you have to encode them to base64 first. Use the following command in a terminal (Linux & Mac):

echo -n "email.address@gmail.com:password" | base64

Then add it to the sketch. For example:

const char* credentials = "ZW1haWwuYWRkcmVzc0BnbWFpbC5jb206cGFzc3dvcmQ=";

Step 7: Testing & Summery

Hope this can be helpful for someone and learned as much as I did. You can use all the files shared here and have a go yourself.

Any comments are welcome, if you if you enjoyed it share your feedback and Vote. Thanks everyone and see you soon. Happy making!

Work From Home Speed Challenge

Participated in the
Work From Home Speed Challenge

Be the First to Share

    Recommendations

    • Space Contest

      Space Contest
    • Lamps and Lighting Contest

      Lamps and Lighting Contest
    • Robots Contest

      Robots Contest

    Comments