Never Miss the Doorbell Again: Build This Smart Email Bell With ESP32

by rohanbarnwal in Circuits > Microcontrollers

84 Views, 1 Favorites, 0 Comments

Never Miss the Doorbell Again: Build This Smart Email Bell With ESP32

20250524_1910_स्मार्ट अलर्ट डोरबेल_remix_01jw189zj7fw7vxkwvys2gr6vn.png
"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:

  1. Sends an email instantly when touched
  2. Doesn't spam - only alerts once per press
  3. Works form anywhere, anytime

Let's dive into the build.

Supplies

download (23).jpeg
download (22).jpeg
WhatsApp Image 2025-05-24 at 6.59.45 PM.jpeg
download (16).jpeg
just_banner-1920×1080-无按钮.jpg

Components You'll Need

  1. ESP32 Dev Board x1: The heart of the system; connects to Wi-Fi and handles email sending.
  2. TTP223 Touch Sensor x1: Digital touch switch - acts as your smart bel trigger.
  3. Micro USB Cable x1: For power and programming your ESP32
  4. Jumper Wired (as needed): For connecting all the components each other
  5. Wi-Fi Connection x1: Required for sending emails.
  6. 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:

  1. A single prototype that looks and feels like a finished product
  2. Or 10,000 units for production - JUSTWAY handles it all with speed, precision, and unmatched professionalism.

What Makes JUSTWAY Special?

  1. Instant Quotation System - Upload CAD, get price instantly.
  2. 3D Live Model Preview - Zoom, pan, rotate - know exactly what you're getting.
  3. Crazy Material Options - Resin(SLA), Nylon PA-12, CNC Aluminum etc.
  4. Industrial Level Finish - Smooth surfaces, sharp details, perfect fit.
  5. End-to-End Support - Dedicated engineers, DFM feedback, Quality checks on every order.

JUSTWAY Summer Cashback Event - Get 15% Back!


Campaign Period: June 1 - August 31,2025 (UTC).

Apply for Cashback After Order Completion

To thank you for your continued support, JUSTWAY is offering 15% cashback on all qualifying orders placed during the campaign period!

How It Works:

  1. Place an order between June 1 to August 31, 2025
  2. After the order is completed, send an email to: marketing03@justway.com
  3. JUSTWAY will review and approve your application.
  4. Once approved, 15% of your eligible order value (excluding shipping taxes, etc.) will be credited to your JUSTWAY account within 3 business days.

Important Details:

  1. Applies to all JUSTWAY services: CNC, 3D Printing, Sheet Metal, etc.
  2. Cashback excludes shipping, VAT, customs, handling fees.
  3. Applications be email is required - cashback is not automatic.
  4. Cashback is non-transferable and non-withdrawable, it can be used on future JUSTWAY orders.
  5. Have multiple orders? One email with multiple order numbers works!
  6. Cashback is only calculated on the actual amount paid (excluding balance/ credit redemptions).

Pro Tip:

The sooner you complete your order, the sooner you get your cashback.

Deadline to apply: September 15,2025 (UTC).

Ready To Place Your Order?

Take advantage of this limited-time offer and get started on your next 3D printing, CNC machining, or sheet metal project today.

Click here to get an instant quote and place your order now!

Remember: After your order ships, email marketing03@justway.com to claim your 15% cashback!

Frequently Asked Question (FAQ)

  1. Is the cashback automatic?: No, you must email them after your order is completed
  2. What info should I include in the email?: Your JUSTWAY email or username, Order number(s), A short cashback request message
  3. When will I get my cashback?: Within 4 business days after approval.
  4. What If I forget to apply?: Cashback won't be automatically issued. You must apply before deadline
  5. Can I apply for multiple orders at once? Yes, include all eligible order numbers in one email.
  6. What is Cashback based on? 15% of your actual paid amount, excluding shipping fees, and tax.
  7. How I can us the cashback? It will be credited to your JUSTWAY balance for future purchases.
  8. Can I earn cashback on cashback credits? No- cashback is only earned on the real money portion for your payment.
  9. Can I combine cashback with coupons on loyalty points? Yes, absolutely!
  10. Who can I contact with questions? Email marketing03@justway.com

How I Ordered My Custom 3d Case From JUSTWAY

11.png

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

22.png

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

33.png
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

44.png

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:

  1. CNC machining
  2. Sheet metal fabrication
  3. Injection molding
  4. Surface finishing

Now let see How It Works (Step-by-Step Flow)

How It Works: the System Boots Up

ChatGPT Image May 25, 2025, 04_17_19 PM.png

As soon as the ESP32 gets power (via USB or a battery module), it boots up and:

  1. Initializes the Wi-Fi connection
  2. Sets up the SMTP mail session
  3. Prepares to monitor the touch sensor (GPIO 23)

ESP32 is now alert and ready - just like a guard dog.

Waiting for the Touch

ChatGPT Image May 25, 2025, 05_11_47 PM.png

The TTP223 touch sensor remains idle, continuously monitored by the ESP32

  1. When untouched: it outputs LOW (0V)
  2. When touched: it instantly output HIGH (3.3v)

ESP32 keeps checking this pin in a tight loop.

Touch Detected - State Change

ChatGPT Image May 25, 2025, 04_24_02 PM.png

As soon as the sensor state changes from LOW to HIGH, the ESP32:

  1. Recognizes this as a bell press
  2. Check if an email was already sent for this press
  3. If no, it proceeds to the next step

This prevents multiple emails from one long press

Email Triggered

ChatGPT Image May 25, 2025, 04_25_43 PM.png

Once triggered, the ESP32 uses:

  1. The ESP Mail Client library
  2. Gmail's SMTP server
  3. 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

ChatGPT Image May 25, 2025, 04_37_44 PM.png

After sending the email, the ESP32:

  1. closes the SMTP session (clean memory usage)
  2. Waits for the touch to be released
  3. Once released (sensor goes LOW), the system is armed again

Now its ready for the next press.

What Makes It Smart?

ChatGPT Image May 25, 2025, 05_19_28 PM.png
  1. No repeated emails per press
  2. Works silently - perfect if you're wearing headphones
  3. Wi-Fi enables - works even if you're not home
  4. 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

  1. Go to: https://myaccount.google.com/security
  2. Scroll to "Signing in to Google"
  3. Click on 2-Step Verification
  4. Follow the steps to set it up (phone number, backup etc.)

Create the App Password

  1. After enabling 2FA, go back to: https://myaccount.google.com/apppasswords
  2. Google may ask you to log in again
  3. Under "Select the app", choose Other (Custom name)
  4. Enter something like: "ESP32 Email Bell"
  5. Click Generate
  6. You'll now see 16-character App Password like: xxx yyyy ssss aaaa
  7. Copy this and use it in your Arduino code in place of your Gmail password.

Where to Paste It in Code:

#define AUTHOR_EMAIL "your_email@gmail.com"
#define AUTHOR_PASSWORD "your_app_password" // Paste app password here (no spaces)

Paste the 16-character password without spaces


Why App Password?

Google blocks access from "less secure apps" using just passwords. App Passwords provide:

  1. Secure, limited access
  2. No need expose main Gmail password
  3. Works perfectly with ESP32 SMTP

Code Overview

Here's what the code does

setup()

  1. connects ESP32 to your Wi-Fi
  2. Prepares SMTP session and login for email

loop()

  1. Constantly reads the state of the touch sensor
  2. on LOW to HIGH transition, sends an email
  3. Prevents duplicate emails by tracking previous state

sendFastEmail()

  1. Composes and sends a custom email alert
  2. Closes SMTP session after sending
#include <WiFi.h>
#include <ESP_Mail_Client.h>

#define TOUCH_PIN 23 // Touch sensor pin

const char* ssid = "Your_SSID";
const char* password = "Your_PASSWORD";

// Gmail SMTP settings
#define SMTP_HOST "smtp.gmail.com"
#define SMTP_PORT 465
#define AUTHOR_EMAIL "your_email@gmail.com"
#define AUTHOR_PASSWORD "your_app_password"
#define RECIPIENT_EMAIL "recipient@example.com"

SMTPSession smtp;
ESP_Mail_Session session;
SMTP_Message message;

bool touchPreviouslyHigh = false;

void setup() {
pinMode(TOUCH_PIN, INPUT);
Serial.begin(115200);

// Fast WiFi connect
WiFi.begin(ssid, password);
Serial.print("Connecting to WiFi");
while (WiFi.status() != WL_CONNECTED) {
delay(100);
Serial.print(".");
}
Serial.println("\nWiFi Connected");

// SMTP setup
session.server.host_name = SMTP_HOST;
session.server.port = SMTP_PORT;
session.login.email = AUTHOR_EMAIL;
session.login.password = AUTHOR_PASSWORD;
session.login.user_domain = "";

smtp.debug(0); // Disable logs for speed
}

void loop() {
bool currentTouchState = digitalRead(TOUCH_PIN);

if (currentTouchState == HIGH && !touchPreviouslyHigh) {
touchPreviouslyHigh = true;
sendFastEmail();
} else if (currentTouchState == LOW && touchPreviouslyHigh) {
touchPreviouslyHigh = false;
}

delay(50); // Fast polling
}

void sendFastEmail() {
message.sender.name = "ESP32 Alert";
message.sender.email = AUTHOR_EMAIL;
message.subject = "Someone is outside the door";
message.addRecipient("User", RECIPIENT_EMAIL);
message.text.content = "Someone is standing outside the door. Open it fast or otherwise...";
message.text.charSet = "utf-8";
message.text.transfer_encoding = Content_Transfer_Encoding::enc_7bit;

if (!smtp.connect(&session)) {
Serial.println("SMTP connection failed");
return;
}

if (MailClient.sendMail(&smtp, &message)) {
Serial.println("ALERT EMAIL SENT!");
} else {
Serial.print("Email error: ");
Serial.println(smtp.errorReason());
}

smtp.closeSession(); // Optional, or keep alive if frequent
}


Circuit Diagram

fdw.jpg

Touch Sensor To ESP32 Dev Board

  1. GND To GND
  2. VCC To 3.3v
  3. 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.