ESP32 Internet of things

Sending an email by the ESP32

Purpose of this tutorial:

In this tutorial we will send an email with the ESP32 card when a push button is pressed.

You must use an SMTP server that allows you to send an email through the ESP32 card.

Necessary components

  • ESP32
  • Pushbutton


To perform the assembly, you can connect

  • the first tab of the push button at pin D21 of the ESP32 board

  • the second leg of the GND pushbutton on the ESP32 board

Program in micropython:

Note: you must import the two libraries: ConnectWifi.py and umail.py.

1 commentaire

Ingo 06-05-2222

Hi! You've programmed a great and flexible solution. Would it be possible to include the subject and the Sender-name into the e-Mail script "umail"? Thank you

Leave a comment

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *

Scroll to Top