Skip to content

Commit 8f9babb

Browse files
authored
Merge branch 'main' into feat/add-support-for-database-cc-and-bcc
2 parents 22b2f8e + 8ee3403 commit 8f9babb

File tree

3 files changed

+29
-7
lines changed

3 files changed

+29
-7
lines changed

src/Resources/app/administration/src/module/frosh-mail-archive/page/frosh-mail-archive-detail/frosh-mail-archive-detail.twig

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -99,11 +99,15 @@
9999
:title="$t('frosh-mail-archive.detail.content.title')"
100100
position-identifier="frosh-mail-archive-content"
101101
>
102-
<h4>HTML</h4>
103-
<iframe :src="htmlText" sandbox frameborder="0"></iframe>
102+
<template v-if="archive.htmlText">
103+
<h4>HTML</h4>
104+
<iframe :src="htmlText" sandbox frameborder="0"></iframe>
105+
</template>
104106

105-
<h4>Plain</h4>
106-
<iframe :src="plainText" sandbox frameborder="0"></iframe>
107+
<template v-if="archive.plainText">
108+
<h4>Plain</h4>
109+
<iframe :src="plainText" sandbox frameborder="0"></iframe>
110+
</template>
107111
</sw-card>
108112
<sw-card :title="$t('frosh-mail-archive.detail.attachments.title')"
109113
position-identifier="frosh-mail-archive-attachments"

src/Resources/app/administration/src/module/frosh-mail-archive/page/frosh-mail-archive-index/index.js

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,25 @@ Component.register('frosh-mail-archive-index', {
100100
return this.$tc(`frosh-mail-archive.state.${state}`);
101101
},
102102

103+
updateData(query) {
104+
for (const filter in this.filter) {
105+
this.filter[filter] = query[filter] ?? null;
106+
}
107+
},
108+
109+
saveFilters() {
110+
this.updateRoute({
111+
limit: this.limit,
112+
page: this.page,
113+
term: this.term,
114+
sortBy: this.sortBy,
115+
sortDirection: this.sortDirection,
116+
naturalSorting: this.naturalSorting,
117+
},
118+
this.filter
119+
);
120+
},
121+
103122
getList() {
104123
this.isLoading = true;
105124

@@ -129,6 +148,7 @@ Component.register('frosh-mail-archive-index', {
129148
this.items = searchResult;
130149
this.total = searchResult.total;
131150
this.isLoading = false;
151+
this.saveFilters();
132152
});
133153
},
134154

src/Services/MailSender.php

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,7 @@ private function saveMail(string $id, Email $message, array $metadata): void
7878
'id' => $id,
7979
'sender' => [$message->getFrom()[0]->getAddress() => $message->getFrom()[0]->getName()],
8080
'receiver' => $this->convertAddress($message->getTo()),
81-
'subject' => $message->getSubject(),
82-
'cc' => $message->getCc(),
83-
'bcc' => $message->getBcc(),
81+
'subject' => $message->getSubject() ?? '',
8482
'plainText' => nl2br((string) $message->getTextBody()),
8583
'htmlText' => $message->getHtmlBody(),
8684
'emlPath' => $emlPath,

0 commit comments

Comments
 (0)