summaryrefslogtreecommitdiff
path: root/alot/db/message.py
diff options
context:
space:
mode:
Diffstat (limited to 'alot/db/message.py')
-rw-r--r--alot/db/message.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/alot/db/message.py b/alot/db/message.py
index 74139315..f7aea829 100644
--- a/alot/db/message.py
+++ b/alot/db/message.py
@@ -459,8 +459,7 @@ class Message:
@cached_property
def _email(self):
try:
- with open(self.filename, 'rb') as f:
- mail = email.message_from_bytes(f.read(), policy = email.policy.SMTP)
+ mail = self._dbman._email_cache.get(self.filename)
except IOError:
warning = b"Subject: Caution!\n"\
b"Message file is no longer accessible:\n%s" % self.filename