mirror of
https://github.com/jwinterm/modoboa.git
synced 2026-10-17 05:41:25 +02:00
Display message even when there is no To field.
This commit is contained in:
@@ -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 }">
|
||||
|
||||
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user