• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

jhillyerd / enmime / 42549480171
89%

Build:
DEFAULT BRANCH: main
Ran 09 Nov 2026 02:11AM UTC
Jobs 3
Files 41
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

09 Nov 2026 02:10AM UTC coverage: 89.04% (-0.01%) from 89.053%
42549480171

push

github

web-flow
Add Envelope.SetAddressHeader (issue #158 Phase 2) (#438)

* Add Envelope.SetAddressHeader (issue #158 Phase 2)

SetHeader and AddHeader run their values through mime.BEncoding.Encode,
which is correct for Subject: but corrupts address headers: a non-ASCII
display name becomes one encoded-word covering the whole address list,
which no longer parses as addresses.  Editing From/To/Cc before Send
therefore meant hand-formatting headers.

SetAddressHeader takes []*mail.Address and writes an RFC 5322 address
list, encoding only the display names that need it as RFC 2047
encoded-words so the header stays ASCII-safe on the wire while remaining
a parseable address list.  Pure-ASCII names are written verbatim when
legal as an RFC 5322 phrase, so the common case stays
`Bob <bob@example.com>`.

Note: Envelope.AddressList still reads only the first value of a header,
which is a separate latent bug and is not changed here.

* Reject CR/LF in addresses passed to SetAddressHeader

Part.encodeHeader writes header values verbatim when the parser runs in
raw-content mode, so an address such as `a@example.com>\r\nX-Injected: yes`
would inject a header into the bytes handed to Sender.Send.  Reuse the
validateSendAddress guard Phase 1 added for the send path, so a bad value
never reaches the header.

52 of 59 new or added lines in 1 file covered. (88.14%)

3794 of 4261 relevant lines covered (89.04%)

40399.7 hits per line

Uncovered Changes

Lines Coverage ∆ File
7
92.53
-1.17% envelope.go
Jobs
ID Job ID Ran Files Coverage
1 Go-1.27.x - 42549480171.1 09 Nov 2026 02:11AM UTC 41
87.15
GitHub Action Run
2 Go-1.25.x - 42549480171.2 09 Nov 2026 02:12AM UTC 41
87.68
GitHub Action Run
3 Go-1.26.x - 42549480171.3 09 Nov 2026 02:11AM UTC 41
87.68
GitHub Action Run
Source Files on build 42549480171
  • Tree
  • List 41
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 2f0a45fd on github
  • Prev Build on main (#42537004570)
  • Next Build on main (#42550116660)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc