Arduino ESP8266 Tutorial: Send an email easily with your Wemos D1 board using a PHP script!

preview_player
Показать описание
In this video we are going to learn how to send email using an ESP8266 based board like the Wemos D1. 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 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.

Want to learn to code?

Рекомендации по теме
Комментарии
Автор

I love your accent it makes your channel even more interesting ...

default_youtube_profile
Автор

Awasome!! You are great!!!I am looking forward for the next project

davidegiuffrida
Автор

Another great project idea... Thanks Nick!

SergeiJonovich
Автор

Nikos you are great.Thanks a lot and keep on the good work.Se eucharisto poly

giannisvlachos
Автор

Yes. Please add some logging and sleep code for sending email on time interval. Great video. Thanks.

thorbennielsen
Автор

Very nice video, just ordered a couple nodemcu boards as they are a bit cheaper, but it would be nice if you could make a video on a wifi enabled relay without the use of a raspberry pi or any other server in between. Sinexise tin kali douleia :D

mcgamingproyt
Автор

Awesome video i can't wait to use my board. Thanks for the share.

DiyintheGhetto
Автор

Hello, thanks for the tutorial.
How would i know which port to use in:
if (client.connect(servername, ?))




Thank you very much.

franciscobruno
Автор

Can you make a tutorial about a I2C LCD driver for Arduino?

KaienSanderOfficial
Автор

You should show us how to make a PHP server on your PC for Arduino as the next tutorial.

thank you .
Marc.

MPElectronique
Автор

Is Wemos D1 board and mini basically the same as ESP8266? Sry I ask this is because your title said ESP8266 but your video only mention these 2 components. Also, can I connect it to mobile hotspot instead of wifi router?

NookDeSus
Автор

Can i do the same with the arduino and the ESP8266 module? Thanks for your really nice videos!

oscargren
Автор

Thanks for such a nice project. how to send an SMS from my mobile with my geo location to another mobile? When I press a hard wired button on esp8266?

mytubejaved
Автор

Hi, I have the same D1 board, but i can't manage to load any sketch to it. always getting errors. is there any good tutorial to run it?

BasselIssa
Автор

Is there a way to remove those characters that appear once we start the serial monitor in arduino IDE? or can i somehow avoid them being send via serial port to, lets say, processing ? so i would want processing to recieve data from arduino, but i want it to ignore those gibberish characters that appear at the begining ... can you help?

Sonyetc
Автор

On Arduino IDE, what is the board I have to select..?

vishvakumara
Автор

With this, you should also do a project where an LED will light up if you receive an email on the esp8266.

karlng
Автор

great tutorial. However, it should be possible to have the ESP8266 send an email directly without having a webserver in between. After all, I can send an email from my desktop without a seperate server account, simply by logging on to say gmail.com.
It will probably take a bit more programming in the ESP8266. Have to give that a try once I have more time

Ed
Автор

Καλησπέρα φίλε και συγχαρητήρια για το κανάλι! Μόλις παράγγειλα το Wemos D1.
Έχω ένα project για το οποίο πρέπει να μετράω την παροχή νερού σε ένα σωλύνα με ένα sensor και να ανεβάζω τα data μέσω wi-fi σε ένα cloud service για επεξεργασία αργότερα. Πόσο καιρό μπορεί να αντέξει με μπαταρία ; Αν υποθέσουμε ότι το σύστημα θα στέλνει δεδομένα μόνο όταν περνάει νερό και θα είναι idle τις υπόλοιπες ώρες;

XWRIATAKOS
Автор

Wow that's killer! :-) I think it could be able to access mySQL database using PHP code. that would make it almost endless possibilities. :-)

DogRox
join shbcf.ru