ESP32-CAM Capture Photos and Send Through E-mail Using SPIFF Memmory. ||NO SD Card Required

Introduction: ESP32-CAM Capture Photos and Send Through E-mail Using SPIFF Memmory. ||NO SD Card Required

Hello Folks,

The ESP32-CAM board is a low cost development board that combines an ESP32-S chip, an OV2640 camera, several GPIOs to connect peripherals and a microSD card slot. It has a number of applications ranges from video streaming web server, build a surveillance camera, take photos, face recognition and detection, and much more.

A few days ago I wonder if I could send a photo captured by ESP32-CAM through E-mail. I found many tutorials on ESP32-CAM capturing photos using ESP32-CAM; saving photos to SD card . So I decided to gather all these applications to one place. The SD-card is not a cost-effective solution for ESP32-CAM because we hardly need 500 KB for storing photo. So I tried to research if I could ignore the usage of SD-Card or replace it with some other memory.

I was so excited to know that there is enough memory available in ESP-32 flash memory called SPIFF memory. So I decided to use this solution and avoid the use of using external SD card hence reducing the cost of my project.

So in this tutorial, I will show how to:

1. Getting started with your ESP-32 CAM

2. Using SPIFF to store Captured photos

3. Using SMTP to send Email the captured photos



FTDI programmer

F2F jumper wires

Step 1: Getting Start With ESP32-CAM Using FTDI Programmer

Arduino IDE can be used to program ESP32-CAM AI-Thinker development board. One of the major draw back of ESP32-CAM is that it does not have USB interface for uploading the sketches. So you will be required an external FTDI programmer for programming the ESP-32.Follow the schematics showed in the picture provided in the description.

ESP32-CAM FTDI Programmer


5V VCC (5V)




This guide shows how to program and upload code to the ESP32-CAM (AI-Thinker) development board using Arduino IDE.The ESP32-CAM AI-Thinker module is an ESP32 development board with an OV2640 camera, microSD card support, on-board flash lamp and several GPIOs to connect peripherals. However, it doesn’t have a built-in programmer. You need an FTDI programmer to connect it to your computer and upload code.

NOTE: The ESP-32 CAM can only be programmed when it is in Flash mode. For enabling the flash mode of ESP32-CAM you have to attach GPIO0 with GND.

After uploading code you need to take out the GPIO 0 wire to disable the flash mode and run the ESP-32 to in normal mode.

Step 2: Upload the Web Server Example for Testing the ESP32-CAM

Before uploading the email sketch you need to make sure that your ESP32-CAM is working perfectly. For this upload the web-server example from ESP32->camera->web-server. The following configration should be set:

Board: ESP32 Wrover Module

Port: your port #

// Select camera model

comment all other models.

set SSID and Password to your Wifi Access point and upload the sketch.

if you can see the video streaming from ESP32-CAM you are ready to upload the email sketch.

Step 3: Change Gmail Account Settings (Less Secure App Access)

For the first time your ESP32-CAM might not get access to gmail services. So you need to change the privacy settings by accessing

allow the less secure app to access your account.

Step 4: Upload the E-mail Application Sketch

Download the sketch given in the description, provide the following parameters:

#define emailSenderAccount

#define emailSenderPassword

#define emailRecipient



That's it upload the sketch.

Be the First to Share


    • Game Design: Student Design Challenge

      Game Design: Student Design Challenge
    • Make It Bridge

      Make It Bridge
    • Big and Small Contest

      Big and Small Contest