Conversation
…tity From is a send-as identity, not a pointer to which account's SMTP to use. Replies stay on the account that received the thread, so overlapping aliases work (A sends as B, B sends as A). New compose still uses the From picker's accountId to choose SMTP.
nitay
marked this pull request as ready for review
September 17, 2026 14:54
@electron/packager 20 auto-discovers mailspring.icon next to the .icns and compiles it with actool, which requires full Xcode 26+. Command Line Tools-only machines failed with: xcode-select: error: tool 'actool' requires Xcode Copy the .icns to a temp dir with no sibling .icon so local unsigned builds still package. CI macOS runners have Xcode and keep the Liquid Glass catalog.
Replies already send via the receiving account's SMTP. The From dropdown now matches that: only that account's primary and aliases, not every configured account. New compose still lists all identities so SMTP can be chosen.
This reverts commit 7ce6e70.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mailspring currently treats the From address as which account sends the mail.
accountForEmail()returns the first primary match, then the first alias, so one address can only belong to one account. Picking the other account's address on a reply callsensureCorrectAccount(), which moves the draft (and dropsthreadId) onto that other account's SMTP.That breaks a normal Gmail send-as setup:
a@gmail.com) can send as Bb@company.com) can send as AReplying to a B thread as A would silently send through A's SMTP, so the copy never appeared in B's Sent folder. Same in the other direction.
Behavior after this change
Replies stay on the account that received the thread. From is any of the user's identities (every primary and alias, de-duplicated by email). SMTP does not change.
New compose still uses the From picker's
contact.accountId(the color-bar row) to choose SMTP. That is how you pick the sending account when there is no thread.Send validation requires From to be one of the user's addresses (
isMyEmail) anddraft.accountIdto be a configured account. It no longer requiresaccountForEmail(from) === draft.accountId.The mail provider still has to allow send-as (Gmail / Workspace "Send mail as"). Mailspring just stops re-homing the draft when it shouldn't.
Code
DraftEditingSession.ensureCorrectAccount()— do not switch accounts on a reply; for new compose, honorfrom.accountIdSendDraftTask.willBeQueued()— allow any of the user's identities as From on the draft's accountthreadIdis presentTests
TDD, all green:
send-draft-task-spec— sending as another account's primary via this account's SMTPensure-correct-account-spec— replies never rehome; new compose uses the picked identity's accountfrom-identities-spec+composer-header-spec— reply From list includes other identities and de-dupes