Never Miss the Doorbell Again: Build This Smart Email Bell With ESP32
by rohanbarnwal in Circuits > Microcontrollers
22 Views, 1 Favorites, 0 Comments
Never Miss the Doorbell Again: Build This Smart Email Bell With ESP32

"When headphones isolate your world, this smart bell breaks through the silence."
Real Problem, Real Frustration
I don't know how many times it's happened...
I'm wearing headphones - zoned in while coding, watching a tutorial, or just relaxing - and I completely miss the doorbell.
By the time I realize, the delivery is gone. The guest is frustrated. The moment is missed.
Sound familiar?
That's exactly why I built this.
The Idea: A Smart Email Notification Bell
What if a doorbell could send me an email the moment it's pressed?
A silent but deadly notification system - one I can't miss, even with noise cancelling headphones on.
Using ESP32, a touch sensor, and a beautiful 3D-Printed case from JUSTWAY, I built a smart IoT powered bell that:
- Sends an email instantly when touched
- Doesn't spam - only alerts once per press
- Works form anywhere, anytime
Let's dive into the build.
Supplies
.jpeg)
.jpeg)

.jpeg)
Components You'll Need
- ESP32 Dev Board x1: The heart of the system; connects to Wi-Fi and handles email sending.
- TTP223 Touch Sensor x1: Digital touch switch - acts as your smart bel trigger.
- Micro USB Cable x1: For power and programming your ESP32
- Jumper Wired (as needed): For connecting all the components each other
- Wi-Fi Connection x1: Required for sending emails.
- 3D-Printed Case x1: Precision-built enclosure that makes your project look pro and clean.
Why This Project Look So Neat and Clean: Credit Goes to JUSTWAY
Let's be honest - you can build most functional electronics project in the world, but if it looks like a spaghetti of jumper wires on cardboard, no one's taking you seriously.
That's exactly why I trusted JUSTWAY to take my project to the next level. And bro, they didn't disappoint - they delivered perfection.
Who Is JUSTWAY?
JUSTWAY is not just a manufacturer - they are the Iron Man suit factory for makers like us.
Whether you need:
- A single prototype that looks and feels like a finished product
- Or 10,000 units for production - JUSTWAY handles it all with speed, precision, and unmatched professionalism.
What Makes JUSTWAY Special?
- Instant Quotation System - Upload CAD, get price instantly.
- 3D Live Model Preview - Zoom, pan, rotate - know exactly what you're getting.
- Crazy Material Options - Resin(SLA), Nylon PA-12, CNC Aluminum etc.
- Industrial Level Finish - Smooth surfaces, sharp details, perfect fit.
- End-to-End Support - Dedicated engineers, DFM feedback, Quality checks on every order.
How I Ordered My Custom 3d Case From JUSTWAY

Step1: Upload Your Design in Seconds: Head to the JUSTWAY website, log in (or sign up if you're new), and jump straight into the "Get Instant Quote" section.
Upload your STP, STL, or other supported CAD file
Choose You Manufacturing Process

from resins, nylon, and PLA to metals and engineering grade polymers. Customize the finish and other specs - get your instant quote on the spot
Preview and Inspect Your Model

Want to double-check how it'll turn out?
JUSTWAY lets you preview the uploaded model in 3D right in the browser before placing the order. Zoom, pan, rotate -inspect every detail
Review Quote & Place Order

JUSTWAY will guarantee excellent production with stringent quality control inspections after your purchase is placed. you can anticipate receiving your 3D model withing the allotted lead time. Experience the ease and effectiveness of using JUSTWAY to bring your 3D creation to life!
They also offer:
- CNC machining
- Sheet metal fabrication
- Injection molding
- Surface finishing
Now let see How It Works (Step-by-Step Flow)
How It Works: the System Boots Up

As soon as the ESP32 gets power (via USB or a battery module), it boots up and:
- Initializes the Wi-Fi connection
- Sets up the SMTP mail session
- Prepares to monitor the touch sensor (GPIO 23)
ESP32 is now alert and ready - just like a guard dog.
Waiting for the Touch

The TTP223 touch sensor remains idle, continuously monitored by the ESP32
- When untouched: it outputs LOW (0V)
- When touched: it instantly output HIGH (3.3v)
ESP32 keeps checking this pin in a tight loop.
Touch Detected - State Change

As soon as the sensor state changes from LOW to HIGH, the ESP32:
- Recognizes this as a bell press
- Check if an email was already sent for this press
- If no, it proceeds to the next step
This prevents multiple emails from one long press
Email Triggered

Once triggered, the ESP32 uses:
- The ESP Mail Client library
- Gmail's SMTP server
- Your App Password (from Gmail)
It sends a professional-looking email with
Subject: Someone is outside the door
Body: Someone is standing outside the door. Open it fast or otherwise...
Boom. Alert delivered.
Session Close & Reset

After sending the email, the ESP32:
- closes the SMTP session (clean memory usage)
- Waits for the touch to be released
- Once released (sensor goes LOW), the system is armed again
Now its ready for the next press.
What Makes It Smart?

- No repeated emails per press
- Works silently - perfect if you're wearing headphones
- Wi-Fi enables - works even if you're not home
- Plug-and-play - just power it up and go
How to Create an App Password in Gmail Step-by-step
Important: You mush have 2 step verification enabled on your Google account to create an App Password.
Step 1: Enable 2-Step Verification
- Go to: https://myaccount.google.com/security
- Scroll to "Signing in to Google"
- Click on 2-Step Verification
- Follow the steps to set it up (phone number, backup etc.)
Create the App Password
- After enabling 2FA, go back to: https://myaccount.google.com/apppasswords
- Google may ask you to log in again
- Under "Select the app", choose Other (Custom name)
- Enter something like: "ESP32 Email Bell"
- Click Generate
- You'll now see 16-character App Password like: xxx yyyy ssss aaaa
- Copy this and use it in your Arduino code in place of your Gmail password.
Where to Paste It in Code:
Paste the 16-character password without spaces
Why App Password?
Google blocks access from "less secure apps" using just passwords. App Passwords provide:
- Secure, limited access
- No need expose main Gmail password
- Works perfectly with ESP32 SMTP
Code Overview
Here's what the code does
setup()
- connects ESP32 to your Wi-Fi
- Prepares SMTP session and login for email
loop()
- Constantly reads the state of the touch sensor
- on LOW to HIGH transition, sends an email
- Prevents duplicate emails by tracking previous state
sendFastEmail()
- Composes and sends a custom email alert
- Closes SMTP session after sending
Circuit Diagram

Touch Sensor To ESP32 Dev Board
- GND To GND
- VCC To 3.3v
- I/O To GPIO 23
Final Thoughts
This isn't just a bell - it's a smart alert system built by a maker, for makers.
With the help of Justway's top-tier prototyping, and a bit of IoT magic, this project proves one thing:
You don't have to miss out - you just have to build smarter.