Skip to content

Commit

Permalink
fix: fix iCloud email fetching due to non-RFC IMAP server (#1026)
Browse files Browse the repository at this point in the history
* fix: fix iCloud email fetching due to non-RFC IMAP server

* update test fixtures
  • Loading branch information
firstof9 authored Dec 4, 2024
1 parent 1ae4b70 commit ac4085c
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 47 deletions.
4 changes: 4 additions & 0 deletions custom_components/mail_and_packages/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,10 @@ def email_fetch(
Returns tuple
"""
# iCloud doesn't support RFC822 so override the 'message parts'
if account.host == "imap.mail.me.com":
parts = "BODY[]"

try:
value = account.fetch(num, parts)
except Exception as err:
Expand Down
Loading

0 comments on commit ac4085c

Please sign in to comment.