This code will relay an email through gmail to whatever final destination is added to the code
Download the ZIP and expand it. You can do this via ArduinoIDE. Once expanded download the .ino file located here called DEMO-ESP32-smtp-send.ino and move it to you ArduioIDE directory that you alrready created for the previous zip. Mine is in here /Users/xxxxx/Documents/Arduino/_projectname
Check out the video on my youtube channel for more info:
https://www.youtube.com/@dash9computing
And Paul Santos (origional author of code): https://randomnerdtutorials.com/esp32-send-email-smtp-server-arduino-ide/