Skip to content

fix: gmail 555 error when sending#1496

Open
andrinoff wants to merge 1 commit into
floatpane:masterfrom
andrinoff:fix/gmail-555
Open

fix: gmail 555 error when sending#1496
andrinoff wants to merge 1 commit into
floatpane:masterfrom
andrinoff:fix/gmail-555

Conversation

@andrinoff

Copy link
Copy Markdown
Member

What?

Fixed the SMTP "555 5.5.2 Syntax error" that occurred when sending emails with CatchAll
enabled by formatting the bare email

Why?

When CatchAll is enabled, the From field displays a formatted address like
"Name email@example.com". This formatted value was being passed directly to Gmail's SMTP
MAIL FROM command, which expects only the bare email address.

According to RFC 5321 (SMTP protocol), the MAIL FROM command must contain only the
mailbox (email address), not a formatted display name. The display name belongs in the
message headers (the From: header), which is separate from the SMTP envelope.

Fixes #1449

Signed-off-by: drew <me@andrinoff.com>
@andrinoff andrinoff requested a review from a team as a code owner June 21, 2026 06:45
@floatpanebot floatpanebot added bug Something isn't working area/sender SMTP send path size/M Diff: 51–200 lines and removed bug Something isn't working labels Jun 21, 2026
@andrinoff

Copy link
Copy Markdown
Member Author

/build

@andrinoff andrinoff added the bug Something isn't working label Jun 21, 2026
@andrinoff

Copy link
Copy Markdown
Member Author

/backport v1

@floatpanebot floatpanebot added the backport/v1 Merge to master and backport to release/v1 label Jun 21, 2026
@floatpanebot

Copy link
Copy Markdown
Member

Benchmark report — no significant change

Metrics worse: 0 · better: 0 (threshold: ±3%).

benchstat output
goos: linux
goarch: amd64
pkg: github.com/floatpane/matcha/backend
cpu: AMD EPYC 7763 64-Core Processor                
                           │   old.txt    │                new.txt                │
                           │    sec/op    │    sec/op      vs base                │
ParseSearchQuery_Simple-4    2.353µ ± 31%    2.608µ ± 28%         ~ (p=0.699 n=6)
ParseSearchQuery_Complex-4   6.706µ ± 91%    7.942µ ± 30%         ~ (p=0.589 n=6)
TokenizeSearchQuery-4        4.609µ ± 84%   10.645µ ± 52%  +130.99% (p=0.009 n=6)
geomean                      4.174µ          6.041µ         +44.74%

                           │   old.txt   │              new.txt               │
                           │    B/op     │    B/op     vs base                │
ParseSearchQuery_Simple-4    26.00 ± 23%   26.00 ± 0%       ~ (p=1.000 n=6)
ParseSearchQuery_Complex-4   762.0 ±  0%   762.0 ± 0%       ~ (p=1.000 n=6) ¹
TokenizeSearchQuery-4        176.0 ±  0%   176.0 ± 0%       ~ (p=1.000 n=6) ¹
geomean                      151.6         151.6       +0.00%
¹ all samples are equal

                           │  old.txt   │              new.txt               │
                           │ allocs/op  │ allocs/op   vs base                │
ParseSearchQuery_Simple-4    2.000 ± 0%   2.000 ± 0%       ~ (p=1.000 n=6) ¹
ParseSearchQuery_Complex-4   23.00 ± 0%   23.00 ± 0%       ~ (p=1.000 n=6) ¹
TokenizeSearchQuery-4        9.000 ± 0%   9.000 ± 0%       ~ (p=1.000 n=6) ¹
geomean                      7.453        7.453       +0.00%
¹ all samples are equal

pkg: github.com/floatpane/matcha/tui
                    │    old.txt    │              new.txt               │
                    │    sec/op     │    sec/op     vs base              │
LogPanelView-4         173.8µ ±  7%   167.9µ ± 22%       ~ (p=0.818 n=6)
SearchOverlayView-4    182.5µ ± 17%   183.7µ ± 18%       ~ (p=0.937 n=6)
InboxConstruction-4   1035.1µ ±  9%   994.0µ ± 12%       ~ (p=0.180 n=6)
geomean                320.2µ         313.0µ        -2.27%

                    │    old.txt    │               new.txt                │
                    │     B/op      │     B/op       vs base               │
LogPanelView-4        44.67Ki ± 51%   44.67Ki ± 51%        ~ (p=1.000 n=6)
SearchOverlayView-4   56.14Ki ± 41%   33.19Ki ± 69%        ~ (p=0.052 n=6)
InboxConstruction-4   874.3Ki ±  0%   874.2Ki ±  0%        ~ (p=0.132 n=6)
geomean               129.9Ki         109.0Ki        -16.08%

                    │   old.txt   │              new.txt              │
                    │  allocs/op  │  allocs/op   vs base              │
LogPanelView-4         714.0 ± 0%    714.0 ± 0%       ~ (p=1.000 n=6)
SearchOverlayView-4    926.0 ± 0%    924.0 ± 0%       ~ (p=0.197 n=6)
InboxConstruction-4   3.478k ± 0%   3.477k ± 0%       ~ (p=0.188 n=6)
geomean               1.320k        1.319k       -0.08%

auto-generated by benchmarks.yml

@floatpanebot

Copy link
Copy Markdown
Member

Build complete (598603a)

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

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

Labels

area/sender SMTP send path backport/v1 Merge to master and backport to release/v1 bug Something isn't working size/M Diff: 51–200 lines

Projects

None yet

Development

Successfully merging this pull request may close these issues.

BUG: Can't send emails with Gmail

3 participants