summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/leap/mail/mail.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/leap/mail/mail.py b/src/leap/mail/mail.py
index 772b6db..feed11b 100644
--- a/src/leap/mail/mail.py
+++ b/src/leap/mail/mail.py
@@ -638,8 +638,9 @@ class MessageCollection(object):
notify_just_mdoc = False
if notify_just_mdoc:
- msgid = headers['message-id']
- self._pending_inserts[msgid] = defer.Deferred()
+ msgid = headers.get('message-id')
+ if msgid:
+ self._pending_inserts[msgid] = defer.Deferred()
if not self.is_mailbox_collection():
raise NotImplementedError()