Skip to content

v0.5.2: Better tests, minor bug fixes, unencrypted auth methods and fig-support.

Latest
Compare
Choose a tag to compare
@wneessen wneessen released this 06 Nov 10:37
b4aa414

Welcome to go-mail v0.5.2! This release is mainly a maintenance release.

fig.StringUnmarshaler support for SMTPAuthType

With #341 we introduce support for the fig.StringUnmarshaler interface for SMTPAuthType. This allows users of fig to reference the mail.SMTPAuthType directly in their fig config.

Allow unencrypted PLAIN and LOGIN smtp authentication

The PR #344 introduced two new SMTPAuthType types: SMTPAuthPlainNoEnc and SMTPAuthLoginNoEnc. Both allow PLAIN and LOGIN authentication over unencrypted connections. This can be useful if the connection has already been secured in a different way (e. g. a SSH tunnel).

Overhaul of the test suite and GH workflow

The PRs #348, #349 and #352 are a full overhaul of the go-mail test suite. Almost all tests have been rewritten to better coverage, visibility and maintainability. We've now covered +92% of all code. The Github workflow was also improved and is now less error prone.

During the tests rewrite a couple of minor bugs were found and fixed on the way:

  • Add error check for nil SMTP authentication method 1c8b290
  • Add error handling for nil DialContextFunc 35f92f2
  • Set fallbackPort to 0 in SetTLSPortPolicy 3efd2b5
  • Move delivery status update after writer close check 42c6379
  • Remove redundant connection check in auth function 5e3ebcc
  • Remove redundant connection check in send function 45ebcb9
  • Add nil check for smtpClient in checkConn function 4a8ac76
  • Refactor error handling in eml parser 769783f
  • Initialize address header map and enforce single 'From' address 08fe44c
  • Fix ToFromString to handle and trim empty addresses c99b6c3
  • Refine CcFromString to handle spaces and empty addresses 855d7f0
  • Improve BccFromString to handle spaces and empty addresses f079ea0
  • Refactor SetDate to use SetDateWithValue ae15a12
  • Initialize genHeader in RequestMDNTo method 4f97cd8
  • Refactor RequestMDNAddTo 4fe9022
  • Follow upstream for HELO during Quit bug 8353b4b - The reported upstream bug was caused by this PR. See: golang/go#70011

What's Changed

CI/CD maintenance changes

  • Bump actions/dependency-review-action from 4.3.4 to 4.3.5 by @dependabot in #343
  • Bump github/codeql-action from 3.26.13 to 3.27.0 by @dependabot in #345
  • Bump actions/setup-go from 5.0.2 to 5.1.0 by @dependabot in #346
  • Bump sonarsource/sonarqube-quality-gate-action from dc2f7b0dd95544cd550de3028f89193576e958b9 to 8406f4f1edaffef38e9fb9c53eb292fc1d7684fa by @dependabot in #351
  • Bump actions/dependency-review-action from 4.3.5 to 4.4.0 by @dependabot in #350

New Contributors

  • @sonalys made their first contribution in #353. Thank you very much for the bugfix!

Full Changelog: v0.5.1...v0.5.2