diff --git a/src/components/NewMessageModal.vue b/src/components/NewMessageModal.vue index 6c9d8a1ddb..bcf91c6c29 100644 --- a/src/components/NewMessageModal.vue +++ b/src/components/NewMessageModal.vue @@ -135,12 +135,14 @@ export default { if (!data.force && data.attachments.length === 0) { var attachmentMissing = false - var lines = toPlain(data.body).value.toLowerCase().split("\n") + var lines = toPlain(data.body).value.toLowerCase().split('\n') + var wordAttachment = t('mail', 'attachment').toLowerCase() + var wordAttached = t('mail', 'attached').toLowerCase() for (let line of lines) { if (line.startsWith('>') || line.startsWith('--')) { break } - if (line.includes(t('mail', 'attachment').toLowerCase()) || line.includes(t('mail', 'attached').toLowerCase())) { + if (line.includes(wordAttachment) || line.includes(wordAttached)) { attachmentMissing = true break }