Skip to content

v0.8.1

Latest

Choose a tag to compare

@wneessen wneessen released this 09 Jul 15:57
2ac36f0

Welcome to go-mail v0.8.1! 🎉

This release is only a small release, but fixes a regression on the 386 platform. We hope you enjoy!

Notable features / improvements / fixes

Fix regression on 386 platforms

The NTLM support introduced in v0.8.0 contained a bug affecting 386 platforms: a 32-bit integer could overflow because it wasn't cast to int64. This caused problems when cross-compiling to the 386 architecture. The bug is fixed in #589. In addition, the CI pipeline has been extended to run cross-compile tests for every platform supported by GitHub runners. Thanks to @firefart for reporting the issue.

Opportunistic SMTP authentication

PR #585 introduces an opportunistic authentication mechanism that lets users provide a list of preferred auth types. During SMTP authentication, the client checks the mechanisms the server supports and selects the first match from the preferred list. If the server supports none of the preferred mechanisms, the client falls back to Autodiscover mode and selects the strongest mechanism the server offers.

Convenience helpers for List-Unsubscribe and one-click List-Unsubscribe-Post

We already expose the HeaderListUnsubscribe and HeaderListUnsubscribePost header constants, but until now there was no dedicated function to construct these headers. Users had to assemble the angle-bracket URI list and the exact List-Unsubscribe=One-Click token by hand via SetGenHeader—something that's easy to get subtly wrong (missing <>, an incorrect POST token, or GET-triggerable URLs). Since February 2024, Gmail and Yahoo require a working RFC 8058 one-click unsubscribe for senders exceeding 5k messages per day, making this a common compliance requirement rather than a niche feature. PR #587 adds three convenience helpers to set these headers correctly:

  • SetListUnsubscribe(uris ...string): sets an RFC 2369 List-Unsubscribe header only (mailto/https links).
  • SetListUnsubscribePost(): sets List-Unsubscribe-Post: List-Unsubscribe=One-Click.
  • SetListUnsubscribeOneClick(httpsURL string, additionalURIs ...string): the common case: sets both headers correctly, validating that at least one HTTPS URL is present as required by RFC 8058.

What's Changed

CI/CD maintenance changes

  • Bump golang.org/x/text from 0.38.0 to 0.39.0 by @dependabot[bot] in #590
  • Bump step-security/harden-runner from 2.19.4 to 2.20.0 by @dependabot[bot] in #591
  • Bump github/codeql-action/autobuild from 4.36.3 to 4.37.0 by @dependabot[bot] in #595
  • Bump github/codeql-action/upload-sarif from 4.36.3 to 4.37.0 by @dependabot[bot] in #594
  • Bump github/codeql-action/analyze from 4.36.3 to 4.37.0 by @dependabot[bot] in #593
  • Bump github/codeql-action/init from 4.36.3 to 4.37.0 by @dependabot[bot] in #592
  • Bump golang.org/x/crypto from 0.53.0 to 0.54.0 by @dependabot[bot] in #597

Full Changelog: v0.8.0...v0.8.1