ESP8266 GMail sender




I will show you how to send emails from any ESP8266 wifi module using Gmail server.

ESP8266 GMail sender




This instructable relies on Arduino core for ESP8266 WiFi chip,

which makes a self-contained microcontroller from it (no need of AT commands and master devices).

You can connect sensors and get notified by email about changes.

Before we begin

Required hardware:

  1. Any ESP8266 (I’m using ESP8266-07 ebay link).
  2. In my case USB UART Board(I’m using FT232RL FTDI Serials Adapter Module ebay). Not needed if your board has usb port.
  3. Some jumper cables.
  4. WIFI router of course.

List may be incomplete.

Required software:

  1. Arduino Software
  2. Arduino core for ESP8266 WiFi chip
  3. Sketch with project and test code (ESP8266_Gmail_Sender.zip).

Step 1: Gmail Account Setup

We are going to use SMTP to send messages.

Using SMTP Authentication we provide only email and password,

by default Google uses more complex verification methods so we need to change settings.

Go to your Google account settings and enable “Allow less secure apps” at the bottom of the page.

This mean apps only need your email and password when login to your gmail account.

If you concerned about security, just use different account.

Step 2: Edit Sketch

I wrote a little sketch which send one test message to check if all works as should.

When all software downloaded and installed:

  • Unzip ESP8266_Gmail_Sender.zip
  • Find and open ESP8266_Gmail_Sender.ino
  • Set your wifi access point name (SSID) and password. Should be like this:
const char* ssid = "MyWiFi";
const char* password = "12345678";
  • In setup() function find
if(gsender->Subject(subject)->Send("[email protected]", "Setup test"))

First parameter of Send() function is recipient email, second message text.

READ  IoT Thermometer Using Python

Change recipient from [email protected] to your email which will receive a message.

I’m receiving many emails every day because some of You guys not attentive, PLEASE DON’T FORGET TO CHANGE RECIPIENT EMAIL!

Subject function is optional! Subject sets once and stored until you change it.

Read more: ESP8266 GMail sender




This Post / Project can also be found using search terms:

  • esp8266 email sender
  • esp8266 gamil
  • esp8266 gmail
  • ESP8266_Gmail_Sender zip

Leave a Comment

*
= 5 + 7

(Spamcheck Enabled)

Read previous post:
Alarm System (2)
Alarm System

The objective of our project was to create an alarm system that could detect an intruder using an IR motion...

Close
Scroll to top