In today’s world of smart and connected systems, IoT (Internet of Things) plays a vital role in remote monitoring and automation. In this project, Arduino Expert has developed an intelligent system titled “Email Notification with ESP32 and Adafruit IO”, where temperature and humidity data from a DHT11 sensor are continuously monitored and uploaded to Adafruit IO, an IoT cloud platform.
If the readings exceed a specific threshold, the system automatically sends an email notification to the user via IFTTT (If This Then That) and Adafruit IO integration.
This project demonstrates practical product design and development skills, IoT data communication, and Arduino programming to create an efficient environment monitoring solution that can be customized for industrial, commercial, and home automation applications.

Project Overview ESP32 Email Notification
The Email Notification with ESP32 and Adafruit IO project aims to collect temperature and humidity data in real-time using the DHT11 sensor and transmit it to Adafruit IO using the ESP32 Wi-Fi microcontroller.
Adafruit IO provides an intuitive dashboard to visualize live data, while IFTTT acts as an automation service that triggers email alerts when the sensor readings exceed the user-defined limits.
For example:
- If temperature > 35°C, or
- If humidity > 80%,
an email alert will be sent automatically to inform the user.
This ensures timely monitoring and preventive actions in temperature-sensitive environments like laboratories, data centers, server rooms, and greenhouses.
Components Used in ESP32 Email Notification Project
- ESP32 Development Board – The main microcontroller with built-in Wi-Fi, used to send sensor data to Adafruit IO.
- DHT11 Sensor – Measures ambient temperature and humidity.
- Adafruit IO Account – Cloud platform for IoT data logging and visualization.
- IFTTT Account – Used for automation and sending email alerts.
- Jumper Wires – For sensor connections.
- USB Cable – To program and power the ESP32.
Circuit Diagram of DHT11 With ESP32
- DHT11 VCC → 3.3V on ESP32
- DHT11 GND → GND
- DHT11 Data → GPIO 4 (or any digital pin)
The ESP32 is powered through the USB connection, and the DHT11 sensor communicates via a single data pin using the OneWire protocol.

Working Principle of ESP32 Email Notification Project
- Sensor Data Collection:
The DHT11 sensor continuously measures temperature and humidity from the surrounding environment. - Data Upload to Adafruit IO:
Using the Adafruit MQTT library, the ESP32 uploads data to the user’s Adafruit IO Feeds in real-time. - Data Visualization:
The user can view live sensor readings on an Adafruit IO Dashboard, displayed as interactive charts or gauges. - IFTTT Automation:
When a specific feed value (temperature or humidity) exceeds the defined limit, Adafruit IO triggers an IFTTT Webhook. - Email Notification:
IFTTT then sends a personalized email notification to the user’s registered email address, indicating that the readings are above safe levels.
This system provides an automated and reliable solution for remote environmental monitoring.
Code for ESP32 Email Notification Project
/***************************************************
Project: Email Notification with ESP32 and Adafruit IO
Developed by: Arduino Expert (arduinoexpert.com)
Description:
This project reads temperature and humidity data from a DHT11 sensor,
sends it to Adafruit IO, and triggers email alerts via IFTTT if values
exceed predefined thresholds.
***************************************************/
#include "WiFi.h"
#include "AdafruitIO_WiFi.h"
#include "DHT.h"
// ------------------- USER CONFIGURATION -------------------
// Adafruit IO credentials
#define IO_USERNAME "YOUR_ADAFRUIT_IO_USERNAME"
#define IO_KEY "YOUR_ADAFRUIT_IO_KEY"
// WiFi credentials
#define WIFI_SSID "YOUR_WIFI_NAME"
#define WIFI_PASS "YOUR_WIFI_PASSWORD"
// DHT11 configuration
#define DHTPIN 4 // DHT11 data pin connected to GPIO 4
#define DHTTYPE DHT11
// Create DHT object
DHT dht(DHTPIN, DHTTYPE);
// Create Adafruit IO instance
AdafruitIO_WiFi io(IO_USERNAME, IO_KEY, WIFI_SSID, WIFI_PASS);
// Create feeds
AdafruitIO_Feed *temperatureFeed = io.feed("temperature");
AdafruitIO_Feed *humidityFeed = io.feed("humidity");
// Thresholds for triggering alerts (should match IFTTT applet conditions)
float temperatureThreshold = 35.0; // in °C
float humidityThreshold = 80.0; // in %
void setup() {
// Start Serial Monitor
Serial.begin(115200);
while (!Serial);
Serial.println("Connecting to Adafruit IO...");
io.connect();
// Initialize DHT sensor
dht.begin();
// Wait for Adafruit IO connection
while (io.status() < AIO_CONNECTED) {
Serial.print(".");
delay(500);
}
Serial.println();
Serial.println("Connected to Adafruit IO!");
}
void loop() {
// Always keep Adafruit IO connection alive
io.run();
// Read temperature and humidity
float humidity = dht.readHumidity();
float temperature = dht.readTemperature();
// Check if readings are valid
if (isnan(humidity) || isnan(temperature)) {
Serial.println("Failed to read from DHT sensor!");
delay(2000);
return;
}
// Print readings to Serial Monitor
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.print(" °C | Humidity: ");
Serial.print(humidity);
Serial.println(" %");
// Send data to Adafruit IO feeds
temperatureFeed->save(temperature);
humidityFeed->save(humidity);
// Check for alert condition (for logging/debug)
if (temperature > temperatureThreshold) {
Serial.println("Temperature above threshold! Email alert will be sent via IFTTT.");
}
if (humidity > humidityThreshold) {
Serial.println("Humidity above threshold! Email alert will be sent via IFTTT.");
}
// Delay before next reading
delay(10000); // 10 seconds
}
How the Code Works
- The ESP32 connects to your Wi-Fi and Adafruit IO using your credentials.
- The DHT11 sensor continuously reads temperature and humidity data.
- The values are published to Adafruit IO feeds (“temperature” and “humidity”).
- When the feed values exceed the set threshold (35°C or 80% RH),
Adafruit IO triggers IFTTT, which then sends an email notification. - The user receives an email with details like “High Temperature Alert” or “High Humidity Alert.”
Adafruit IO and IFTTT Setup
1. Create an Adafruit IO Account:
- Go to https://io.adafruit.com
- Note your Adafruit IO Username and AIO Key from “My Key” section.
- Create two feeds:
temperaturehumidity
2. Create an IFTTT Applet:
- Go to https://ifttt.com
- Create a new Applet:
Trigger (If This) → Choose Adafruit → “Monitor feed value”
Condition: when temperature > 35°C (for example)
Action (Then That) → Choose Email → “Send me an email” - Do the same for humidity if needed.
Applications of ESP32 Email Notification Project
- Smart Home Automation – Monitor room temperature and humidity, receive alerts when conditions are abnormal.
- Industrial Automation – Supervise machinery or production environments sensitive to temperature or humidity changes.
- Greenhouse Monitoring – Maintain optimal growing conditions for plants.
- Data Centers – Prevent equipment overheating by receiving timely notifications.
- Cold Storage Monitoring – Ensure products remain within the required temperature range.
Advantages of ESP32 Email Notification Project
- Real-time monitoring and alert system.
- Cloud-based data visualization using Adafruit IO.
- Instant email notification via IFTTT.
- Fully wireless operation using ESP32 Wi-Fi.
- Scalable and customizable for various industrial and home applications.
Product Design and Development Perspective
From a product design and development viewpoint, this project showcases the integration of IoT hardware, cloud services, and automated communication systems. The same concept can be expanded into a commercial product that monitors multiple sensors and sends notifications through different channels like SMS, Telegram, or mobile app alerts.
At Arduino Expert, we specialize in Arduino programming, IoT prototyping, and custom hardware design, helping clients build complete connected solutions for real-world applications. Projects like this form the foundation for scalable IoT-based monitoring systems that can be tailored for specific industry needs.
Conclusion
The Email Notification with ESP32 and Adafruit IO project is a perfect demonstration of how IoT and automation can enhance everyday systems by providing real-time data monitoring and automated notifications.
By integrating ESP32, Adafruit IO, and IFTTT, we achieve a cost-effective, reliable, and efficient alert system suitable for a wide range of applications.
This project not only highlights the power of Arduino programming and IoT connectivity but also reflects Arduino Expert’s expertise in product design and development—transforming simple ideas into functional and scalable technological solutions.
Need Help in this Project?
If you need this ESP32 Email Notification Project System with or without Modifications or Customization then you can contact us through WhatsApp.
Learn More about the services we offer.