Skip to content

uPesy ships directly only in France !

uPesy products available on Amazon for EU

Contents Menu Expand Light mode Dark mode Auto light/dark mode

Sending emails with its ESP32 and Arduino code

(Updated at 01/03/2023)

Sending automatic emails from ESP32 is possible!

This is very useful for sending daily or weekly reports of the values measured by your sensors or for sending an alarm when an unusual event occurs. For example:

  • The battery of the ESP32 board is low.

  • A mail has been detected in your mailbox

  • Detection of an unknown person

We are going to simulate a minimalist mail client like Outlook, Gmail, or Mozilla Thunderbird using the Arduino library ESP-Mail-Client from mobizt

esp32 mail client library

La librairie à même un petit logo

Note

The library allows you to send emails and read those received in your inbox. You can even send attachments stored in the flash memory of the ESP32.

In our case, it is mainly to send emails that it is interesting. The library works with any mailbox supporting the protocol SMTP SMTP is a protocol for sending mail to a recipient .

Note

I would use a Gmail and Outlook box for the example.

Install the Arduino library ESP-Mail-Client

It is installed like any other Arduino library. It is available in the Arduino IDE’s library manager (located in Tools → Manage libraries ) :

This article is available to premium members only. You still have 88% to discover.

Subscribe for only 5$/month

Already subscribed? Sign in