Skip to content

fix(ui): select the matching sender for replies - #13802

Open
LorenzLoesch wants to merge 1 commit into
nextcloud:mainfrom
LorenzLoesch:fix/reply-sender-identity
Open

LorenzLoesch wants to merge 1 commit into
nextcloud:mainfrom
LorenzLoesch:fix/reply-sender-identity

Conversation

@LorenzLoesch

@LorenzLoesch LorenzLoesch commented Oct 3, 2026 •

Copy link
Copy Markdown

Replies to mail received through an alias currently default to the account's primary address. Automatically select the configured account or alias involved in the clicked message, including identities on other connected accounts. Users can override the From address in the composer for each message.

  • Match incoming To, then Cc, then From; prefer the containing account within each field.
  • Prefer From for sent messages and explicit follow-ups, preserving the original To/Cc recipients.
  • Preserve manual sender changes when reopening the composer.

Fixes #6236. Related: #607 and #10559 (closed duplicate of #6236).

Validation:

  • Full JavaScript unit suite: 514 tests across 51 files pass on Vue 3, including identity precedence, account switching, recipient handling, manual sender changes, and composer reopening.
  • ESLint reports no errors; Stylelint and whitespace checks pass.
  • Full PHP unit suite on Nextcloud 34.0.4 / PHP 8.3.33: 1,556 tests and 4,485 assertions pass (composer test:unit -- --no-coverage). The suite emits three existing discovery warnings for missing S/MIME chain-key fixtures.

AI assistance: Implementation and local reviews were assisted by Codex (GPT-6).

@LorenzLoesch
LorenzLoesch marked this pull request as ready for review October 4, 2026 14:38
Comment thread src/components/AppSettingsMenu.vue Outdated
<NcFormBoxSwitch
:model-value="replyFromMatchingAddress"
:label="t('mail', 'Automatically select the sender address for replies')"
:description="t('mail', 'Use the account or alias involved in the message')"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kra-mo can we make it the default without a option to change? It sound reasonable to me to automatically pick the recipient as alias (if defined).

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, people can always manually change it on a case-by-case basis if needed.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sure, do you want me to change it that way?

i modelled the feature after gmail, where you can change it in the settings. but i agree that this is not necessary.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes please

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@kesselb done, please check

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I modelled the feature after gmail

image

Yeah, maybe let's not use this as a reference for design ;)

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i think the pr is in good shape now. let me know if anything else needs to change.

@LorenzLoesch
LorenzLoesch force-pushed the fix/reply-sender-identity branch 2 times, most recently from bb2e045 to 714cbfe Compare October 6, 2026 14:24
Replies to alias-addressed mail defaulted to the account primary,
which changed the sending identity in an existing conversation.
Match the clicked message against configured accounts and aliases;
the composer provides a per-message override.

Preserve outgoing recipients independently of the selected identity
and clear the old alias when choosing a primary address.

Identity inference is limited to the clicked message. New messages,
forwards, and restored drafts retain their existing identity handling.

Signed-off-by: Lorenz Loesch <lorenz.loesch@gmail.com>
@LorenzLoesch
LorenzLoesch force-pushed the fix/reply-sender-identity branch from 31da7da to 55fbb2e Compare October 8, 2026 13:49

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Auto select alias on reply thread

3 participants