New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
IMAP Unread E-mail - Search charset for outlook.office365.com #20642
Comments
I tried this but still get that same error though. It is the imap.py right? |
Indeed its it In the new files the line that i changed is 161 from result, lines = await self._connection.search(self._search) to result, lines = await self._connection.search(self._search, charset=None) |
@MysteryMerijn Fixed it for me ty (it appears I editted the wrong file before) |
For the ones looking for this, the file has been renamed in later versions of Home Assistant. You can now find it here: ~site-packages/homeassistant/components/imap/sensor.py |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. |
Home Assistant release with the issue:
0.86.4
Last working Home Assistant release (if known):
Unknown
Operating environment (Hass.io/Docker/Windows/etc.):
Ubuntu 18.04 venv
Component/platform:
https://www.home-assistant.io/components/sensor.imap/
Description of problem:
I have been having problems while connecting to the outlook.office365.com imap server. With the config below i was getting an unread mail count of 8 allways, even when there were less ore more unread mails.
Problem-relevant
configuration.yaml
entries and (fill out even if it seems unimportant):Traceback (if applicable):
Additional information:
Affter learning python and the imap protocol, and inspecting the source code for the component i found that it is linked to the charset. The library used for connection to imap servers sends utf-8 as default encoding for search commands. This (for some unknown reason does not work for outlook.office365.com) i was getting the response
[BADCHARSET (US-ASCII)] The specified charset is not supported.
witch is split as 8 results. Setting it to None fixed the issue.When manualy changing line 157 from
to
the component works for microsoft email adresses.
Im not sure about making this a configurable value and how contributing to open source projects would work. So here is my issue.
The text was updated successfully, but these errors were encountered: