Skip to content

fix(reply): use send-as envelope#1279

Merged
andrinoff merged 2 commits into
floatpane:masterfrom
FromSi:fix/reply-mail-from-mailing
May 16, 2026
Merged

fix(reply): use send-as envelope#1279
andrinoff merged 2 commits into
floatpane:masterfrom
FromSi:fix/reply-mail-from-mailing

Conversation

@FromSi
Copy link
Copy Markdown
Contributor

@FromSi FromSi commented May 12, 2026

What?

Updates the SMTP envelope sender for outgoing mail.

Matcha now uses send_as_email for MAIL FROM when it is configured. If it is not configured, it keeps the existing fallback behavior.

This applies to regular email sending and calendar replies.

Why?

Closes #1274

Previously, MAIL FROM was based on fetch_email, with account.email as the fallback.

Now the order is:

send_as_email -> fetch_email -> account.email

fetch_email is used to match incoming messages to an account. For outgoing mail, the configured Send-As address should be used first.

@FromSi FromSi requested a review from a team as a code owner May 12, 2026 21:51
@floatpanebot floatpanebot added bug Something isn't working size/XS Diff: 0–10 lines area/sender SMTP send path and removed size/XS Diff: 0–10 lines labels May 12, 2026
@andrinoff
Copy link
Copy Markdown
Member

This is an impossible situation, where FetchEmail does not have the right to send on behalf of EmailAddress (or should be impossible)

EmailAddress, on the other hand can be not an email. This is why it is using FetchEmail

#448, change made in #449

@andrinoff
Copy link
Copy Markdown
Member

@FromSi please, change this PR, to send the envelope at first from Send-as address, if set, otherwise, fall back to FetchEmail (which will never be empty, so no need to fall back to EmailAddress

@FromSi
Copy link
Copy Markdown
Contributor Author

FromSi commented May 13, 2026

@andrinoff I updated the SMTP envelope sender to use GetSendAsEmail(), so MAIL FROM now uses the configured send-as address first and falls back through the existing fetch-email behavior.

Is this what you had in mind?

Also, should I remove the “Closes #...” text from the PR description?

@floatpanebot floatpanebot added the size/XS Diff: 0–10 lines label May 13, 2026
@andrinoff
Copy link
Copy Markdown
Member

Yes, that's what I had in mind, thank you.

No, don't remove it, it's still the fix for this.

@andrinoff
Copy link
Copy Markdown
Member

/build

@floatpanebot
Copy link
Copy Markdown
Member

Build complete (ca79b63)

Warning

This is an unreviewed PR build and has not been security audited. It may contain bugs, vulnerabilities, or malicious code. Do not use for daily use. Only use for testing purposes.

OS Arch Download
Linux amd64 matcha_preview_linux_amd64.tar.gz
Linux arm64 matcha_preview_linux_arm64.tar.gz
macOS amd64 matcha_preview_darwin_amd64.tar.gz
macOS arm64 matcha_preview_darwin_arm64.tar.gz
Windows amd64 matcha_preview_windows_amd64.zip
Windows arm64 matcha_preview_windows_arm64.zip

@andrinoff
Copy link
Copy Markdown
Member

the issue creator doesn't seem to respond. I'll merge either way

Copy link
Copy Markdown
Member

@andrinoff andrinoff left a comment

Choose a reason for hiding this comment

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

lgtm now

@andrinoff
Copy link
Copy Markdown
Member

@FromSi can you change the PR description?

@FromSi FromSi changed the title fix(reply): account sender for lists fix(reply): use send-as envelope May 16, 2026
@FromSi
Copy link
Copy Markdown
Contributor Author

FromSi commented May 16, 2026

@andrinoff the title and description have been updated

@andrinoff andrinoff merged commit 29bcd7f into floatpane:master May 16, 2026
20 checks passed
@andrinoff
Copy link
Copy Markdown
Member

@andrinoff the title and description have been updated

@FromSi , I think @LeaWhoCodes emailed you and invited to the org

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

Labels

area/sender SMTP send path bug Something isn't working size/XS Diff: 0–10 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Replying to a mailing list uses the list's address as the SMTP MAIL FROM (Causes 554 Error)

3 participants