I built upon the ESP32-CAM board and a PIR sensor module to build a motion-triggered image capturing system that also sends an email with the image as an attachment. The board spends most of the time in sleep mode and wakes up to take an image once motion is detected. Once motion is detected, it takes the picture of the intruder or whatever, saves it on the file memory system of the board called SPIFFs, then using STMP protocols, it sends the image to a designated mail.