@bobfrankston/rmfmail 1.1.190 → 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.ts CHANGED
@@ -858,6 +858,18 @@ async function openCompose(mode: ComposeMode, overrideMsg?: any, overrideAccount
858
858
  ? explicitDomains
859
859
  : (accountDomain ? [accountDomain] : []),
860
860
  );
861
+ // Extract the bare email address from a header value that may be a full
862
+ // `"Display Name" <addr@host>` form. detectReplyFrom must return a BARE
863
+ // address because the compose side wraps it as `${accountName} <${addr}>`
864
+ // — passing a full name+addr there produced the nested garbage
865
+ // `Bob Frankston <"mailing list" <multicians@groups.io>>` (Bob 2026-05-28).
866
+ // Delivered-To on mailing-list mail commonly carries a display name.
867
+ function bareAddress(raw: string): string {
868
+ if (!raw) return raw;
869
+ const angle = raw.match(/<([^>]+)>/);
870
+ if (angle) return angle[1].trim();
871
+ return raw.trim().replace(/^"+|"+$/g, "");
872
+ }
861
873
  function detectReplyFrom(): string | undefined {
862
874
  if (!msg) return undefined;
863
875
  // Delivered-To is set by the receiving server — it IS an identity at this
@@ -866,14 +878,15 @@ async function openCompose(mode: ComposeMode, overrideMsg?: any, overrideAccount
866
878
  // when their domain matches the account's identityDomains, since To/Cc
867
879
  // can be set by the sender and aren't authoritative.
868
880
  if (msg.deliveredTo) {
869
- console.log(`[compose] reply From → ${msg.deliveredTo} (Delivered-To)`);
870
- return msg.deliveredTo;
881
+ const addr = bareAddress(msg.deliveredTo);
882
+ console.log(`[compose] reply From → ${addr} (Delivered-To, bare of "${msg.deliveredTo}")`);
883
+ return addr;
871
884
  }
872
885
  if (identityDomains.length === 0) return undefined;
873
886
  const candidates: string[] = [
874
887
  ...((msg.to || []).map((a: any) => a.address)),
875
888
  ...((msg.cc || []).map((a: any) => a.address)),
876
- ].filter(Boolean);
889
+ ].filter(Boolean).map(bareAddress);
877
890
  for (const addr of candidates) {
878
891
  const domain = addr.split("@")[1]?.toLowerCase();
879
892
  if (domain && identityDomains.some(d => domain === d || domain.endsWith(`.${d}`))) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bobfrankston/rmfmail",
3
- "version": "1.1.190",
3
+ "version": "1.1.191",
4
4
  "description": "Local-first email client with IMAP sync and standalone native app",
5
5
  "type": "module",
6
6
  "main": "bin/mailx.js",
@@ -38,7 +38,7 @@
38
38
  "dependencies": {
39
39
  "@bobfrankston/iflow-direct": "^0.1.51",
40
40
  "@bobfrankston/mailx-host": "^0.1.13",
41
- "@bobfrankston/mailx-imap": "^0.1.72",
41
+ "@bobfrankston/mailx-imap": "^0.1.73",
42
42
  "@bobfrankston/mailx-store-web": "^0.1.26",
43
43
  "@bobfrankston/mailx-sync": "^0.1.19",
44
44
  "@bobfrankston/miscinfo": "^1.0.12",
@@ -118,7 +118,7 @@
118
118
  "dependencies": {
119
119
  "@bobfrankston/iflow-direct": "^0.1.51",
120
120
  "@bobfrankston/mailx-host": "^0.1.13",
121
- "@bobfrankston/mailx-imap": "^0.1.72",
121
+ "@bobfrankston/mailx-imap": "^0.1.73",
122
122
  "@bobfrankston/mailx-store-web": "^0.1.26",
123
123
  "@bobfrankston/mailx-sync": "^0.1.19",
124
124
  "@bobfrankston/miscinfo": "^1.0.12",