Display message even when there is no To field.

This commit is contained in:
Antoine Nguyen
2026-01-22 17:22:41 +01:00
parent 89c03bb26f
commit 56f96f928a
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -105,7 +105,7 @@
<v-spacer />
<span class="text-grey">{{ email.date }}</span>
</div>
<div class="mt-2 text-grey">
<div v-if="email.to.length" class="mt-2 text-grey">
{{ $gettext('To') }}
<v-menu v-for="(rcpt, index) in email.to" :key="`to-${index}`">
<template #activator="{ props }">
+4 -1
View File
@@ -45,6 +45,7 @@ class ImapEmail(Email):
self.imapc = self.imapc.__enter__()
self.mbox, self.mailid = self.mailid.split(":")
self.attachments: dict[str, str] = {}
self.To = []
def __del__(self):
self.imapc.__exit__()
@@ -69,7 +70,9 @@ class ImapEmail(Email):
addressbook = self.request.user.addressbook_set.first()
if not addressbook:
return
contacts = [self.From] + self.To
contacts = [self.From]
if hasattr(self, "To"):
contacts += self.To
if hasattr(self, "Cc"):
contacts += self.Cc
for contact in contacts: