diff --git a/frontend/src/components/webmail/EmailList.vue b/frontend/src/components/webmail/EmailList.vue index f7141ff05..45da064a2 100644 --- a/frontend/src/components/webmail/EmailList.vue +++ b/frontend/src/components/webmail/EmailList.vue @@ -228,9 +228,7 @@ const autoRefreshContent = () => { } const submitSearch = () => { - if (search.value) { - fetchEmails() - } + fetchEmails() } const toggleAllSelection = (value) => { diff --git a/modoboa/webmail/lib/imaputils.py b/modoboa/webmail/lib/imaputils.py index 706e6ebc0..cfc9adbd6 100644 --- a/modoboa/webmail/lib/imaputils.py +++ b/modoboa/webmail/lib/imaputils.py @@ -301,8 +301,8 @@ class IMAPconnector: key = "SUBJECT" else: continue - criterions = or_criterion(criterions, f"({key} {pattern})") - self.criterions = [bytearray(criterions, "utf-8")] + criterions = or_criterion(criterions, f'({key} "{pattern}")') + self.criterions = [bytearray(criterions, "utf8")] def messages_count(self, **kwargs) -> int: """An enhanced version of messages_count.