Arduino ESP8266 Email tutorial

Home/Arduino Projects/Arduino ESP8266 Email tutorial

Arduino ESP8266 Email tutorial

Arduino ESP8266 Email tutorial

In this video we are going to learn how to send email using an ESP8266 based board like the Wemos D1 with this Arduino ESP8266 Email Tutorial. As you are going to find out it is very easy and it won’t take us more than 10 minutes.

Having a WiFi enabled board, like the ESP8266 enable us to do many more things. I wanted to learn how to send emails from the Wemos Board in order to get reports from my projects to my email account easily. As you are going to find out, it is very easy!

I have built a simple project in order to demonstrate what I mean. I have connected a DHT22 temperature and humidity sensor, and when the project boots up, it measures the temperature and the humidity and sends the data to my email address! This functionality can be very useful in some projects. As you are going to find out is very easy add such functionality in your Arduino projects. But let’s see how to build this project.

The parts needed in order to build the Arduino ESP8266 email tutorial are these:


Wemos D1:

Wemos D1 mini:




Xiaomi PowerBank:


Full disclosure: All of the links above are affiliate links. I get a small percentage of each sale they generate. Thank you for your support!

The code of the project consists of two parts, the Arduino code, and the server code. We are not sending the email directly from the board to the email address but I used another solution which in my opinion is much easier to implement. The board all it does is to gather the data and send them to a remote web server. There, a simple php script will send that data to any email address we want. This way the Arduino code is extremely easy as you are going to see and we have already build a project like this. The php code is also extremely easy, it is 7 lines of code.

Of course, you must have a web server available if you are going to use this solution. Since 2006 I use as my hosting provider and I host all my websites there. So, since I had a webserver available this solution was the easiest for me to implement. It took me less than hour to make this project work. If you don’t have a webserver available with around 4$ per month you can have your own bluehost account. You can find a link for it in the description of the video. Of course, you can use any other host you like, I use bluehost for over 10 years that’s why I recommend it.



Full disclosure: The link above is affiliate link. I get a small percentage of each sale they generate. Thank you for your support!









Never miss a video: Subscribe to



  1. Adam January 10, 2017 at 8:26 pm - Reply

    Where can I get The DHT header file please

  2. Aitsam February 7, 2017 at 9:59 am - Reply

    i want to send data to android app through web server in above project. can u tell i how i can do that.
    can you send php code for that. I’ll be thankful to you.

  3. Ryan September 13, 2017 at 2:05 pm - Reply

    Can I complete this project on a mega 2560

Leave A Comment