Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix regression of custom smtp.Auth not working #429

Merged

Conversation

wneessen
Copy link
Owner

This change re-introduces custom smtp.Auth support, which has been removed by accident. See #428. To make sure this does not happen again, a couple of tests have been added that make sure the custom auth is working as intended. This includes a testCustomAuth struct to verify the "CUSTOM" method and enhancements in the client to handle custom auth types. Resolves issue #428.

This change re-introduces custom smtp.Auth support, which has been removed by accident. See #428. To make sure this does not happen again, a couple of tests have been added that make sure the custom auth is working as intended. This includes a `testCustomAuth` struct to verify the "CUSTOM" method and enhancements in the client to handle custom auth types. Resolves issue #428.
`t.Context()` was only just introduced in Go 1.24. Of course we cannot use that in general yet.
Upgraded the Go version in the .golangci.toml file from 1.23 to 1.24 to align with the latest Go release. This ensures compatibility and takes advantage of the newest features and improvements.
Removed redundant `nil` check for the subject header as `len(s) < 1` sufficiently ensures the desired logic. This is to make golangci-lint happy
Copy link

codecov bot commented Feb 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.71%. Comparing base (9920ddb) to head (2c2c977).
Report is 5 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #429   +/-   ##
=======================================
  Coverage   94.71%   94.71%           
=======================================
  Files          30       30           
  Lines        3536     3539    +3     
=======================================
+ Hits         3349     3352    +3     
  Misses        138      138           
  Partials       49       49           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

@james-d-elliott james-d-elliott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, passes our previously failing tests for us.

@wneessen wneessen merged commit c9c8a3b into main Feb 16, 2025
28 of 29 checks passed
@wneessen wneessen deleted the bug/428_smtpauthcustom-setsmtpauth-doesnt-appear-to-be-effectual branch February 16, 2025 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SMTPAuthCustom / SetSMTPAuth doesn't appear to be effectual
2 participants