From d576c900a8f8d6a1b1976555fbec9ff1aae49e88 Mon Sep 17 00:00:00 2001 From: steven-mpawulo Date: Tue, 23 Jun 2026 21:08:28 +0300 Subject: [PATCH 1/3] feat: warn users when sending email with empty to field Signed-off-by: steven-mpawulo --- src/components/Composer.vue | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/components/Composer.vue b/src/components/Composer.vue index e8c217aeb1..b6b168023c 100644 --- a/src/components/Composer.vue +++ b/src/components/Composer.vue @@ -1539,6 +1539,11 @@ export default { }, async onSend() { + + if (this.selectTo.length === 0) { + showWarning(t('mail', 'The email has no visible ‘To’ recipients. Some mail providers may reject this message.')) + } + if (this.encrypt) { logger.debug('get encrypted message from mailvelope') await this.$refs.mailvelopeEditor.pull() From 0ad3191353e5504bc14b1e604d34b16e348ba6cd Mon Sep 17 00:00:00 2001 From: steven-mpawulo Date: Wed, 24 Jun 2026 16:58:20 +0300 Subject: [PATCH 2/3] fix: updates the warning from toast to a helper text --- src/components/Composer.vue | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/components/Composer.vue b/src/components/Composer.vue index b6b168023c..d6d9ecd53f 100644 --- a/src/components/Composer.vue +++ b/src/components/Composer.vue @@ -98,6 +98,9 @@ +
+

{{ t('mail', 'The email has no visible ‘To’ recipients. Some mail providers may reject this message') }}

+
-

{{ t('mail', 'The email has no visible ‘To’ recipients. Some mail providers may reject this message') }}

+

{{ t('mail', 'The email has no visible ‘To’ recipients. Some mail providers may reject this message') }}

@@ -778,7 +778,6 @@ export default { isTextBlockPickerOpen: false, recipientSearchTerms: {}, smimeSignAliases: [], - displayMissingToWarning: false } }, @@ -1000,6 +999,10 @@ export default { return this.mainStore.getSharedTextBlocks()?.map((textBlock) => ({ title: textBlock.title, content: textBlock.content })) .concat(this.mainStore.getMyTextBlocks().map((textBlock) => ({ title: textBlock.title, content: textBlock.content }))) }, + + displayMissingToWarning() { + return this.selectTo.length === 0 + }, }, watch: { @@ -1545,10 +1548,6 @@ export default { async onSend() { - if (this.selectTo.length === 0) { - this.displayMissingToWarning = true - } - if (this.encrypt) { logger.debug('get encrypted message from mailvelope') await this.$refs.mailvelopeEditor.pull() @@ -1846,6 +1845,12 @@ export default { -webkit-user-select: text; user-select: text; } + + &__helper-text { + margin-top: 2px; + margin-bottom: 2px; + color: var(--color-text-error); + } } // Make composer editor expand @@ -1979,12 +1984,6 @@ export default { padding-inline-start: 10px; } -.to-warning { - margin-top: 2px; - margin-bottom: 2px; - color: var(--color-text-error); -} - :deep(.vs__selected-options .vs__dropdown-toggle .vs--multiple ){ width: 100%; }