Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nopnop2002/esp-idf-imap-client

IMAP email client for esp-idf
https://github.com/nopnop2002/esp-idf-imap-client

esp-idf esp32 gmail imap imap-client

Last synced: about 1 month ago
JSON representation

IMAP email client for esp-idf

Awesome Lists containing this project

README

        

# esp-idf-imap-client
IMAP email client for esp-idf.

esp-idf contains an email smtp client example, but an imap email client example is missing.
So i made imap email client example.
I used [this](https://github.com/RealAlphabet/IMAP) as a reference.

# Software requirements
esp-idf v4.4/v5.0.

# Installation
```
git clone https://github.com/nopnop2002/esp-idf-imap-client
cd esp-idf-imap-client
chmod 777 getpem.sh
./getpem.sh
idf.py set-target {esp32/esp32s2/esp32s3/esp32c3/esp32c2}
idf.py menuconfig
idf.py flash monitor
```

# Configuration
Set the following items using menuconfig.

![config-top](https://github.com/nopnop2002/esp-idf-imap-client/assets/6020549/11644d4e-9cc7-4524-bacd-dbeaaba232cf)
![config-app](https://github.com/nopnop2002/esp-idf-imap-client/assets/6020549/8ee9ff1d-2afb-411c-bbca-70018aad296d)

## WiFi Setting

![config-wifi](https://github.com/nopnop2002/esp-idf-imap-client/assets/6020549/4cefe2fb-6476-4fc2-92d4-af7f29c0f226)

## IMAP Server Setting
__I've only tested with a Gmail account.__
If you want to use a non-gmail account, you need to change gmail_root_cert.pem according to [this](https://github.com/espressif/esp-idf/issues/7250) instruction.

__Note about Gmail:__
To help keep your account secure, from May 30, 2022, Google no longer supports the use of third-party apps or devices which ask you to sign in to your Google Account using only your username and password.
Due to this change, you can no longer log in to Google from ESP-IDF using only your username and password.

__You will need to generate a special app password as described [here](https://support.google.com/mail/answer/185833).__
An app password is a 16-character code generated by your device.
Use this code as your password.

![config-imap-1](https://github.com/nopnop2002/esp-idf-imap-client/assets/6020549/04676f82-ef78-4994-93e7-72cff59ef8a0)

You can choose which emails to fetch.
![config-imap-2](https://github.com/nopnop2002/esp-idf-imap-client/assets/6020549/3daac20d-9a29-4573-a3dc-8eebdf64e882)
![config-imap-3](https://github.com/nopnop2002/esp-idf-imap-client/assets/6020549/65f59912-d0b1-4034-9d57-c50957d6910f)

If you want to search the string included in the subject, specify the search string.
![config-imap-4](https://github.com/nopnop2002/esp-idf-imap-client/assets/6020549/a3982871-ea81-4b3e-add9-25f369857d70)

# Screen Shot
I searched for the string `Add a profile photo`.
![ScreenShot](https://github.com/nopnop2002/esp-idf-imap-client/assets/6020549/d6ffc008-f216-4c12-b986-1993971c98cd)

# Subject encoding
The subject may be an encoded string, such as UTF-8.
This project does not decode these.
![Encording](https://github.com/nopnop2002/esp-idf-imap-client/assets/6020549/24af7983-7d38-4544-adf3-d05577949ec6)