Arduino Email Sender With Ethernet Adapter/shield




About: Hi, I'm Matej and I'm a student of Electrical Engineering. I have been working with electronics for more than 7 years and have lots of knowledge, projects and lots to share along my path, so this page is jus...

Hello again.

Not long ago, I reached 50 000 views on my ESP8266 Wi-fi module. I was quite amazed and wanted to thank everybody that watched it, liked it and commented on it. On September 2., I published instructable on Weather station and got featured only 15 min after publish. I was very motivated to do more as I see all the views, comments and wanted to say thank you all.

Now, let's go to the meat of this project.
My father asked me to do a little project with Arduino that would send an e-mail when a push button is pressed or anything, can be based on temperature reading, so make sure you watch my previous instructable on that or to send that something has closed up on the distance sensor. Be sure to watch those tutorials on my profile.

So I started looking on the web for a way to send emails with bare arduino and an ethernet shield. I already did a mini project that was sending email by pushing a button, but was done with some python on a pc or Raspberry pi. That can be a waste of money, if you want to leave your Raspberry or any small computer inside of a project.

So as I wanted to do it with only and ethernet shield, I came upon an obstacle. A code for this very purpose can be found in first google searches on Arduino playground site, but it gave me errors as it works with smtp protocol but most email services like gmail want a more reliable connection with some safety like SSL. Arduino just might not be able to do that. Now correct me if I'm wrong, but those were some facts that I found on forums regarding the errors that I was getting. Now what.

Than I found this amazing site called Temboo. It spins around IoT and everything related to that. They also support sending mail by their library, that is believe it or not, already implemented inside Arduino IDE by default.

I will guide how to set up a GMAIL account, how to set the electronics and get the thing working.


You will need:

-Arduino Uno or any board alike

-Ethernet shield

-momentary Push button

-10k/1k Resistor (depends what you have in stock and you can use any resistor above 1k but those are most common)

-Ethernet cable

You can start by attaching the Ethernet shield on the Uno and in my case I added a prototyping shield so I don't need an external breadboard (you can see that in the introduction picture).

Step 2: Connecting Hardware

Now that you have your Ethernet shield on your Uno, let's connect the push button to one of the free I/O pins. Keep in mind that Ethernet shield uses quite a lot of them. The ones that are free are 2, 6 and 8. I'm going to choose the pin 2.

As you can see in the picture, the push button is wired the way, that when the button is pressed, the current from 5v starts flowing threw the resistor and into GND and the PIN 2 so it puts it HIGH. But when the button isn't pressed, the resistor pulls PIN 2 LOW as it is connected to the GND so that PIN 2 doesn't read anything else when the button isn't pressed.

That's all for the hardware part of side so now let's start with setting up a GMAIL and TEMBOO account .

*If you happen to have one of those small Ethernet adapter things, I will try to show how to operate with one of those if I will find one.*

Step 3: Setting Up GMAIL Account

Now we will configure your GMAIL account so It can be accessed by Temboo servers. For any project it is good, to make yourself another gmail account just for these kind of purpose.That way you don't need to worry about your personal account. All that said, that doesn't mean that the site will hack into it, as it can be trusted.

Now, these steps will be shown for each picture, so 1 picture 1 step, so follow the pictures while reading.


STEP 1 *has no related image*: Make yourself a gmail account to use it for sending emails.

STEP 2 *starts with first picture*: When you have logged into your new gmail account, 2-step Verification setting, that will get you the the 2-step verification setup. You can get to this setting in your gmail setting page, but it would take you some time, so go ahead and click on that link. This is going to generate a 16 character code for the Temboo to be able to access your gmail account to send emails. The page should look like this (first picture). The orange circle shows you, when your 2-step verification is active.

STEP 3: Click on the second tab on the banner that reads "Gesla za dostop...." It will say different in English but just click on the same button. It will take you on this site and now click on that bottom button that is circled with orange color.

STEP 4:Than this page should pop up that will contain all the "Apps" that have access to your gmail with each one having a unique code.

STEP 5: Click on the bottom to select the App and click "Other" and name it the way you like it.

STEP 6: This screen should pop up with a code. You want to copy that code somewhere else like an empty browser tab as you will need it later as the password. This is that 16 character code that I was talking about.

This is the end of the GMAIL part, now let's go set up your Temboo account.

Step 4: Setting Up Temboo Account

Same thing as before, every step for 1 picture.

STEP 1: Go to Temboo site and you will be prompted with this site. Enter your email and your password (not your email password, your new Temboo password).

STEP 2: Once you have done that, you will get to this site. Sellect other Arduino board +ethernet shield as this is what we have today.

STEP 3: When you get to this site...

STEP 4: on the tab "Send an email from your gmail account".

STEP 5: This is the site that will open.

STEP 6: Now we will start by selecting Arduino board and Arduino ethernet on the tab nex to it. Mine is renamed, because I saved my configurations on that name, as you can do that with a click on a button on the top right corner of the form that we will fill up.

STEP 7: First thing in the form is the password, that we saved before. Put that in, everything is self explanatory.

STEP 8: Now you click the RUN button that will take your info and will put it in a code. The code can be downloaded on the bottom button. The code will look like this and doesn't need any new libraries to install. The next picture shows another arduino tab that hold your username and password and account of Temboo. In the future, you can change things like subject and body text or anything else in the code, or just simply correct the form and click again on the run button.


Now you are all set to go and all you need is to connect your arduino sandwich to power and internet, wait a few seconds and press. You will se mail on the recipients side soon. What is all great about this is that you can add more recipients in the code and more buttons or something, so it sends mail to different people or to select a different subject or body text.

I managed to film this short demo on how does it work. Don't comment on the messy table ;)


I would like to thank you for watching my tutorial. It took me a day to make it without any pauses with all the pictures, writing and finishing all together. I would appreciate if you recommend it if you found it useful and drop a like (favorite) or ask me anything as it keeps me motivated to do these instructables. I have lost of good ideas for the future so until than, have fun and be sure to share if you did something amazing around this project.

Cheers :)



  • Classroom Science Contest

    Classroom Science Contest
  • Colors of the Rainbow Contest

    Colors of the Rainbow Contest
  • Backyard Contest

    Backyard Contest

32 Discussions


3 years ago

good one ....can you provide me cost of building and for equipment..

6 replies

I can provide you with data, that I found myself the cheapest on sites like ebay:

-Original Uno: 24$ but you can go as low as 10$ for a fake one or use something like nano or pro Micro that I bought on ebay last week for 3,5$

-ethernet shield: Original costs 30€ but I got my at our 2. hand shop for 14€ and you can probably go lower than that on ebay plus you can also get new Chinese clone for cheap

-a button and a resistor isn't more than 20 cent ;)

-if you want to know, I got my proto shield for 2$ on ebay/Bangood

Hope it helps

uno goes as low as 2.50-3 euro even. Pro mini around 1.50
have seen ethernetshield around 5 euro

protoshield, just bought one for 1.60 euro

all on,

Matej Blagšičdiy_bloke

Reply 3 years ago

That's even better. I literally just found out today, when my friend bought a whole uno for 3,5€ as the atmega chip costs that much here so cool, thanks for that data update :)

Matej Blagšičdiy_bloke

Reply 3 years ago

Nice, but in the long run a little more qualified components and build can be useful to leave your project somewhere to use it as for prototyping it's probably good enough.


1 year ago

Temboo no longer support the Arduino Ethernet shield apparently, only yun & bluetooth :-(


1 year ago

I've just been told by Temboo support that "For security reasons, we do no longer support Arduino shields" :-(


2 years ago

Hi! Instead of using button, can we make auto message for example when the temperature of the home exceeds 35 degree I want to know as getting mail?


2 years ago

Hi can you send full code becouse temboo does not support other boards anymore.


2 years ago


I just came across your instructable and got really intrested in your work! :)

I am planing to do one of these myself, but are not sure which "Ethernet Shield" that i should pick(?)

Would this one be sufficient? -->

(The thing i noticed with the shield in the link, is that there is no pins from the shield that goes into the Arduinos "IOREF" and "RESET".)

Whigh shield would you reccomend? :)


1 reply
Matej Blagšičadapet200

Reply 2 years ago

I used just the original arduino ethernet shield that is very cheap for genuine part and got mine for 14€ locally, but now when it is officially retired, it might me cheaper. So just look for it on ebay or your local used products site. The ic on it is ws5100 to help you search.
Regards, M


2 years ago

Hi All.

I am part
of the planning team that is running Tech Ilford event in Ilford Central
Library on the 17th June 2017. We are also looking for people to take part and
give talks on our March event.

We are
putting on this event to encourage people and business to use Technology like
Software / Heard wear / 3D printers / Lasers cutters / Millers / Routers /
Engravers / Knife Cutters and Embroidery / CNC Sawing and Embroidery Machines.
Anything that you use and could be shown to the public.

This would
be a great opportunity to demonstrate what your company can do to the public /
colleges and businesses.

We could
love it at Tech Ilford, if you would like to come down, take part or even give
a talk about what you do. Then please contact: or

Here is a
link to some of the event that we are holding;

With Kind

Mr Denzil


2 years ago

So how about when I want the Arduino to RECEIVE an email and give a pulse as output? Can it be done with this same setup and other code?


2 years ago

Thank you for the instructions, yet this does not work for me. I have all the parts and the same sheild, and setup, but when I press the button I dont get an email. Is their anything I should check for or do?


3 years ago

Hi there,

Many thanks for your time in producing this guide. I am not clear though, will this only send a preset message? I am looking to send at least one vairable number such as " The current temp is" 123 "c" and may be date and time as well. I intend to use a RTC to send the email once a day so could add the date / time to the email.

1 reply
Matej Blagšičgrendell

Reply 2 years ago

You can do it. Just use a variable instead of text for message to send a changing number, such as temperature.


3 years ago

hallo , i really appreciate your invention

whether it uses intermediaries pc to run it? or directly from arduino to switch and directly to tembo ?