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

go-pkgz / email / 44036524980
94%

Build:
DEFAULT BRANCH: master
Ran 17 Nov 2026 07:10AM UTC
Jobs 1
Files 3
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

17 Nov 2026 07:09AM UTC coverage: 94.444% (+1.6%) from 92.875%
44036524980

push

github

web-flow
Add SendBatch to send several messages over one connection (#33)

* Limit the CI token to read access

The workflow set no permissions, so the job inherited the repository's
token permissions, which can include write access. Set contents: read
explicitly to prevent inherited write access and address the CodeQL
actions/missing-workflow-permissions warning.

* Replace interface{} with any

any is an alias of interface{}, so existing Logger implementations and
the generated mocks stay compatible.

* Add SendBatch to send several messages over one connection

Previously, Send ended the SMTP session after each message, including
when a client was supplied through the SMTP option, so a batch of
emails meant one session per message.

SendBatch reuses one connection, authenticating once when credentials
are configured and sending each valid message in its own transaction.
After a rejection by the server it continues only if RSET succeeds.
RSET comes from the new single-method SMTPResetter interface, which
smtp.Client implements; SMTPClient is unchanged, so existing
implementations keep compiling. A failed or unavailable reset, a
connection failure or a cancelled or expired context stops the rest
of the batch. BatchError reports the result of every message, and its
Is and As methods let errors.Is and errors.As look into it on Go 1.19,
which does not follow a multi-error Unwrap.

The authentication, transaction and QUIT steps of SendContext move
into helpers shared with SendBatch, without a change in its behaviour.

* Report the context error for the message in flight in SendBatch

Previously, cancelling the context while a message was in flight on a
connection SendBatch had opened closed that connection, and the
message and the rest of the batch failed with a closed network
connection error that did not match context.Canceled. A deadline
could do the same through the connection deadline, which is set to
the context's and can fire before ctx.Err reports it.

No... (continued)

141 of 142 new or added lines in 1 file covered. (99.3%)

510 of 540 relevant lines covered (94.44%)

174.02 hits per line

Uncovered Changes

Lines Coverage ∆ File
1
93.64
2.2% email.go
Jobs
ID Job ID Ran Files Coverage
1 44036524980.1 17 Nov 2026 07:10AM UTC 3
94.44
GitHub Action Run
Source Files on build 44036524980
  • Tree
  • List 3
  • Changed 1
  • Source Changed 0
  • Coverage Changed 1
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • 54ad4486 on github
  • Prev Build on master (#41331228511)
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