The scope of the IoT applications is growing from controlling appliances to monitoring devices (like sensors) and sending e-mails. So here I am writing an article on Sending Email from ESP8266 and it will be a step forward in the IoT Implementation.

Components Required

ESP8266

Breadboard

USB Cable

Software

SMTP Server Setup

In order to send e-mail from ESP8266 Module, we need to use the SMTP protocol. Hence, an SMTP Server is required to send the e-mails and the ESP8266 will act as an SMTP Client.

So, I have decided to use a third-party SMTP Server and I found “SMTP2GO” as a reliable choice.

Put your setup or configuration code in the setup function, it will only run once during the startup. Here in the setup function, it will initialize serial communication for debugging and logging with a baud rate of 115200.

Connection process can take couple of seconds. While() loop checks the module connection with the WiFi network. If it is connected to WiFi then it will display WiFi connected message on the serial monitor, otherwise it will continue to display “dots (……)”.