mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-11-13 13:00:43 +00:00
2.0 KiB
2.0 KiB
title, description, ha_category, ha_release, ha_iot_class, ha_domain, ha_platforms, ha_integration_type, ha_codeowners, ha_config_flow
| title | description | ha_category | ha_release | ha_iot_class | ha_domain | ha_platforms | ha_integration_type | ha_codeowners | ha_config_flow | |||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| IMAP | Instructions on how to integrate IMAP unread email into Home Assistant. |
|
0.25 | Cloud Push | imap |
|
integration |
|
true |
The IMAP integration is observing your IMAP server and reporting the number of unread emails. Other search criteria can be used, as shown in the example below.
{% include integrations/config_flow.md %}
Gmail with App Password
If you’re going to use Gmail, you need to create an App Password.
- Go to your Google Account
- Select Security
- Under “Signing in to Google” select App Passwords
- Sign in to your Account, and create a new App Password for Gmail.
- Then you can setup the intergation as below:
- Server:
imap.gmail.com - Port:
993 - Username: Your full email address
- Password: The new app password
- Server:
Configuring IMAP Searches
By default, this integration will count unread emails. By configuring the search string, you can count other results, for example:
ALLto count all emails in a folderFROM,TO,SUBJECTto find emails in a folder (see IMAP RFC for all standard options)- Gmail's IMAP extensions allow raw Gmail searches, like
X-GM-RAW "in: inbox older_than:7d"to show emails older than one week in your inbox. Note that raw Gmail searches will ignore your folder configuration and search all emails in your account!
Selecting a charset supported by the imap server
Below is an example for setting up the integration to connect to your Microsoft 365 account that requires US_ASCII as charset:
- Server:
outlook.office365.com - Port:
993 - Username: Your full email address
- Password: Your password
- Charset:
US-ASCII