@bobfrankston/rmfmail 1.1.189 → 1.1.191
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/app.bundle.js +10 -3
- package/client/app.bundle.js.map +2 -2
- package/client/app.js +18 -3
- package/client/app.js.map +1 -1
- package/client/app.ts +16 -3
- package/package.json +3 -3
- package/packages/mailx-imap/index.d.ts +7 -0
- package/packages/mailx-imap/index.d.ts.map +1 -1
- package/packages/mailx-imap/index.js +10 -0
- package/packages/mailx-imap/index.js.map +1 -1
- package/packages/mailx-imap/index.ts +10 -0
- package/packages/mailx-imap/package-lock.json +2 -2
- package/packages/mailx-imap/package.json +1 -1
- /package/packages/mailx-imap/{node_modules.npmglobalize-stash-4032 → node_modules.npmglobalize-stash-53996}/.package-lock.json +0 -0
package/client/app.bundle.js
CHANGED
|
@@ -7444,17 +7444,24 @@ async function openCompose(mode, overrideMsg, overrideAccountId) {
|
|
|
7444
7444
|
const identityDomains = foldDomains(
|
|
7445
7445
|
explicitDomains.length > 0 ? explicitDomains : accountDomain ? [accountDomain] : []
|
|
7446
7446
|
);
|
|
7447
|
+
function bareAddress(raw) {
|
|
7448
|
+
if (!raw) return raw;
|
|
7449
|
+
const angle = raw.match(/<([^>]+)>/);
|
|
7450
|
+
if (angle) return angle[1].trim();
|
|
7451
|
+
return raw.trim().replace(/^"+|"+$/g, "");
|
|
7452
|
+
}
|
|
7447
7453
|
function detectReplyFrom() {
|
|
7448
7454
|
if (!msg) return void 0;
|
|
7449
7455
|
if (msg.deliveredTo) {
|
|
7450
|
-
|
|
7451
|
-
|
|
7456
|
+
const addr = bareAddress(msg.deliveredTo);
|
|
7457
|
+
console.log(`[compose] reply From \u2192 ${addr} (Delivered-To, bare of "${msg.deliveredTo}")`);
|
|
7458
|
+
return addr;
|
|
7452
7459
|
}
|
|
7453
7460
|
if (identityDomains.length === 0) return void 0;
|
|
7454
7461
|
const candidates = [
|
|
7455
7462
|
...(msg.to || []).map((a) => a.address),
|
|
7456
7463
|
...(msg.cc || []).map((a) => a.address)
|
|
7457
|
-
].filter(Boolean);
|
|
7464
|
+
].filter(Boolean).map(bareAddress);
|
|
7458
7465
|
for (const addr of candidates) {
|
|
7459
7466
|
const domain = addr.split("@")[1]?.toLowerCase();
|
|
7460
7467
|
if (domain && identityDomains.some((d) => domain === d || domain.endsWith(`.${d}`))) {
|