mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Resolve #1126
This commit is contained in:
parent
ffde5ddfb3
commit
2c014caa72
1 changed files with 4 additions and 5 deletions
|
|
@ -1356,7 +1356,7 @@ export class ComposePopupView extends AbstractViewPopup {
|
|||
async getMessageRequestParams(sSaveFolder, draft)
|
||||
{
|
||||
let Text = this.oEditor.getData().trim(),
|
||||
l = Text.length,
|
||||
l,
|
||||
hasAttachments = 0;
|
||||
|
||||
// Prepare ComposeAttachmentModel attachments
|
||||
|
|
@ -1374,10 +1374,6 @@ export class ComposePopupView extends AbstractViewPopup {
|
|||
}
|
||||
});
|
||||
|
||||
if (!draft && !l && !hasAttachments) {
|
||||
throw i18n('COMPOSE/ERROR_EMPTY_BODY');
|
||||
}
|
||||
|
||||
const
|
||||
identity = this.currentIdentity(),
|
||||
params = {
|
||||
|
|
@ -1426,6 +1422,9 @@ export class ComposePopupView extends AbstractViewPopup {
|
|||
? await this.mailvelope.createDraft()
|
||||
: await this.mailvelope.encrypt(recipients);
|
||||
} else if (sign || encrypt) {
|
||||
if (!draft && !hasAttachments && !Text.length) {
|
||||
throw i18n('COMPOSE/ERROR_EMPTY_BODY');
|
||||
}
|
||||
let data = new MimePart;
|
||||
data.headers['Content-Type'] = 'text/'+(isHtml?'html':'plain')+'; charset="utf-8"';
|
||||
data.headers['Content-Transfer-Encoding'] = 'base64';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue