@bobfrankston/rmfmail 1.2.252 → 1.2.254
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/client/android-bootstrap.bundle.js +29 -31
- package/client/android-bootstrap.bundle.js.map +2 -2
- package/client/app.bundle.js +23 -0
- package/client/app.bundle.js.map +3 -3
- package/client/app.js +26 -0
- package/client/app.js.map +1 -1
- package/client/app.ts +24 -0
- package/client/compose/compose.bundle.js +37 -3
- package/client/compose/compose.bundle.js.map +3 -3
- package/client/compose/compose.css +13 -0
- package/client/compose/compose.js +41 -1
- package/client/compose/compose.js.map +1 -1
- package/client/compose/compose.ts +38 -1
- package/client/lib/api-client.js +7 -0
- package/client/lib/api-client.js.map +1 -1
- package/client/lib/api-client.ts +8 -0
- package/client/lib/mailxapi.js +10 -2
- package/package.json +5 -5
- package/packages/mailx-imap/package-lock.json +2 -2
- package/packages/mailx-imap/package.json +1 -1
- package/packages/mailx-service/index.d.ts +19 -1
- package/packages/mailx-service/index.d.ts.map +1 -1
- package/packages/mailx-service/index.js +27 -2
- package/packages/mailx-service/index.js.map +1 -1
- package/packages/mailx-service/index.ts +28 -2
- package/packages/mailx-service/jsonrpc.js +3 -1
- package/packages/mailx-service/jsonrpc.js.map +1 -1
- package/packages/mailx-service/jsonrpc.ts +3 -1
- package/packages/mailx-service/package.json +1 -1
- package/packages/mailx-settings/package.json +1 -1
- package/packages/mailx-store/package.json +1 -1
- package/packages/mailx-store-web/android-bootstrap.js +1 -1
- package/packages/mailx-store-web/android-bootstrap.js.map +1 -1
- package/packages/mailx-store-web/android-bootstrap.ts +1 -1
- package/packages/mailx-store-web/package.json +1 -1
- package/packages/mailx-store-web/web-service.d.ts +5 -1
- package/packages/mailx-store-web/web-service.d.ts.map +1 -1
- package/packages/mailx-store-web/web-service.js +5 -1
- package/packages/mailx-store-web/web-service.js.map +1 -1
- package/packages/mailx-store-web/web-service.ts +5 -1
- package/packages/mailx-types/mailx-api.d.ts +17 -1
- package/packages/mailx-types/mailx-api.d.ts.map +1 -1
- package/packages/mailx-types/mailx-api.ts +10 -1
- package/packages/mailx-types/mime-build.d.ts.map +1 -1
- package/packages/mailx-types/mime-build.js +42 -30
- package/packages/mailx-types/mime-build.js.map +1 -1
- package/packages/mailx-types/mime-build.ts +51 -32
- package/packages/mailx-types/package.json +1 -1
- /package/packages/mailx-imap/{node_modules.npmglobalize-stash-85680 → node_modules.npmglobalize-stash-77932}/.package-lock.json +0 -0
|
@@ -2458,13 +2458,11 @@ function buildMimeMessage(opts) {
|
|
|
2458
2458
|
const commonHeaders = headers.filter((h) => h !== null);
|
|
2459
2459
|
if (opts.simpleHtml) {
|
|
2460
2460
|
const body = opts.bodyHtml || opts.bodyText || "";
|
|
2461
|
-
const
|
|
2462
|
-
|
|
2463
|
-
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
\r
|
|
2467
|
-
` + encodeQuotedPrintable(body);
|
|
2461
|
+
const htmlPart = {
|
|
2462
|
+
headers: [`Content-Type: text/html; charset=UTF-8`, `Content-Transfer-Encoding: quoted-printable`],
|
|
2463
|
+
body: encodeQuotedPrintable(body)
|
|
2464
|
+
};
|
|
2465
|
+
const raw2 = wrapWithAttachments(commonHeaders, htmlPart, opts.attachments || [], newBoundary);
|
|
2468
2466
|
return { raw: raw2, messageId, inlineImageCount: 0 };
|
|
2469
2467
|
}
|
|
2470
2468
|
const extracted = hasHtml ? extractInlineImages(opts.bodyHtml, opts.domain) : { html: "", images: [] };
|
|
@@ -2523,39 +2521,38 @@ ${wrap76(im.base64)}\r
|
|
|
2523
2521
|
body: textEncoded
|
|
2524
2522
|
};
|
|
2525
2523
|
};
|
|
2526
|
-
const
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2524
|
+
const raw = wrapWithAttachments(commonHeaders, makeInner(), opts.attachments || [], newBoundary);
|
|
2525
|
+
return { raw, messageId, inlineImageCount: inlineImages.length };
|
|
2526
|
+
}
|
|
2527
|
+
function wrapWithAttachments(commonHeaders, inner, attachments, newBoundary) {
|
|
2528
|
+
if (attachments.length === 0) {
|
|
2529
|
+
return [...commonHeaders, ...inner.headers].join("\r\n") + `\r
|
|
2530
|
+
\r
|
|
2531
|
+
` + inner.body;
|
|
2532
|
+
}
|
|
2533
|
+
const mixedBoundary = newBoundary();
|
|
2534
|
+
const endCRLF = (s) => s.endsWith("\r\n") ? s : s + "\r\n";
|
|
2535
|
+
const parts = [
|
|
2536
|
+
`--${mixedBoundary}\r
|
|
2533
2537
|
` + inner.headers.join("\r\n") + `\r
|
|
2534
2538
|
\r
|
|
2535
|
-
` + inner.body
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2539
|
+
` + endCRLF(inner.body)
|
|
2540
|
+
];
|
|
2541
|
+
for (const att of attachments) {
|
|
2542
|
+
const filename = (att.filename || "attachment").replace(/[\r\n"]/g, "_");
|
|
2543
|
+
const mime = att.mimeType || "application/octet-stream";
|
|
2544
|
+
parts.push(`--${mixedBoundary}\r
|
|
2541
2545
|
Content-Type: ${mime}; name="${filename}"\r
|
|
2542
2546
|
Content-Disposition: attachment; filename="${filename}"\r
|
|
2543
2547
|
Content-Transfer-Encoding: base64\r
|
|
2544
2548
|
\r
|
|
2545
2549
|
${wrap76(att.dataBase64 || "")}\r
|
|
2546
2550
|
`);
|
|
2547
|
-
|
|
2548
|
-
|
|
2551
|
+
}
|
|
2552
|
+
return [...commonHeaders, `Content-Type: multipart/mixed; boundary="${mixedBoundary}"`].join("\r\n") + `\r
|
|
2549
2553
|
\r
|
|
2550
2554
|
` + parts.join("") + `--${mixedBoundary}--\r
|
|
2551
2555
|
`;
|
|
2552
|
-
} else {
|
|
2553
|
-
const inner = makeInner();
|
|
2554
|
-
raw = [...commonHeaders, ...inner.headers].join("\r\n") + `\r
|
|
2555
|
-
\r
|
|
2556
|
-
` + inner.body;
|
|
2557
|
-
}
|
|
2558
|
-
return { raw, messageId, inlineImageCount: inlineImages.length };
|
|
2559
2556
|
}
|
|
2560
2557
|
var init_mime_build = __esm({
|
|
2561
2558
|
"packages/mailx-types/mime-build.js"() {
|
|
@@ -6492,7 +6489,7 @@ var WebMailxService = class _WebMailxService {
|
|
|
6492
6489
|
await this.syncManager.undeleteMessage(accountId, uid, folderId);
|
|
6493
6490
|
}
|
|
6494
6491
|
// ── Drafts ──
|
|
6495
|
-
async saveDraft(accountId, subject, bodyHtml, bodyText, to, cc, previousDraftUid, draftId, bcc, from) {
|
|
6492
|
+
async saveDraft(accountId, subject, bodyHtml, bodyText, to, cc, previousDraftUid, draftId, bcc, from, attachments) {
|
|
6496
6493
|
const settings = await loadSettings();
|
|
6497
6494
|
const account = settings.accounts.find((a) => a.id === accountId);
|
|
6498
6495
|
if (!account)
|
|
@@ -6506,6 +6503,7 @@ var WebMailxService = class _WebMailxService {
|
|
|
6506
6503
|
subject: subject || "(no subject)",
|
|
6507
6504
|
bodyHtml,
|
|
6508
6505
|
bodyText,
|
|
6506
|
+
attachments,
|
|
6509
6507
|
domain: account.email.split("@")[1] || "mailx.local",
|
|
6510
6508
|
extraHeaders: [`X-Mailx-Draft-ID: ${id}`],
|
|
6511
6509
|
omitMessageId: true,
|
|
@@ -11753,7 +11751,7 @@ function installBridge() {
|
|
|
11753
11751
|
await service.send(msg);
|
|
11754
11752
|
return { ok: true };
|
|
11755
11753
|
},
|
|
11756
|
-
saveDraft: (p) => service.saveDraft(p.accountId, p.subject, p.bodyHtml, p.bodyText, p.to, p.cc, p.previousDraftUid, p.draftId, p.bcc, p.from),
|
|
11754
|
+
saveDraft: (p) => service.saveDraft(p.accountId, p.subject, p.bodyHtml, p.bodyText, p.to, p.cc, p.previousDraftUid, p.draftId, p.bcc, p.from, p.attachments),
|
|
11757
11755
|
deleteDraft: async (accountId, draftUid) => {
|
|
11758
11756
|
await service.deleteDraft(accountId, draftUid);
|
|
11759
11757
|
return { ok: true };
|