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

Fork the net/smtp package from Go's stdlib into go-mail #100

Merged

Conversation

wneessen
Copy link
Owner

As part of #97 we are going to fork the official net/smtp package into go-mail to provide us with more flexibility.

This PR forks net/smtp based on original Go stdlib commit: golang/go@b2faff1 into smtp/. Also go-mail's own LoginAuth has been moved from auth/ into smtp/ to be consistent with the stdlib.

The original license has been imported and the license headers have been adjusted to reflect the go-mail's MIT license and the original Go BSD-3-Clause license. Additionally, the license headers have been converted to SPDX style.

Finally the code and tests of the original code have been adjusted in a way that the complaints of golanci-lint were fixed.

wneessen and others added 8 commits January 10, 2023 00:38
As part of #97 we are going to fork the official `net/smtp` package into go-mail to provide us with more flexibility.

This commit fulfills the first big step of importing the package into smtp/. Also go-mail's own LoginAuth has been moved from auth/ into smtp/ to be consistent with the stdlib.

There are still a couple of open issues (i. e. license adjustments and making golangci-lint happy) but so far all tests already work, which is a good start.
- Also import the original BSD-3-Clause.txt license from the Go team into the LICENSES directory
- Further on, license headers should hold "The go-mail Authors" instead of my name. Did this already for the MIT license.
Fixed open issues in smtp_test.go
Fix open TODO in smtp_test.go and fork `testenv.SkipFlaky()` from `internal/testenv` to implement flaky test skipping for FBSD
Implemented negative check for AuthLogin Auth method
…e Go project into the smtp/ directory as suggested in #97 (comment)
@wneessen wneessen linked an issue Jan 13, 2023 that may be closed by this pull request
The following changes make use of methods that are not available in Go 1.17/Go 1.18. To guarantee at least 4 versions of backwards compatibility, versioned copies of those changes have been back-ported:
- golang/go@4d8db00#diff-4f6f6bdb9891d4dd271f9f31430420a2e44018fe4ee539576faf458bebb3cee4
- golang/go@58158e9#diff-772fc9f5d0c86f26e35158fb3e7a71a4967d18b4ec23a5dbb60781ab0babf426
@codecov-commenter
Copy link

Codecov Report

Merging #100 (2950f22) into main (a7126b4) will decrease coverage by 2.37%.
The diff coverage is 69.72%.

@@            Coverage Diff             @@
##             main     #100      +/-   ##
==========================================
- Coverage   83.26%   80.89%   -2.38%     
==========================================
  Files          15       20       +5     
  Lines        1548     1837     +289     
==========================================
+ Hits         1289     1486     +197     
- Misses        185      251      +66     
- Partials       74      100      +26     
Impacted Files Coverage Δ
smtp/smtp.go 64.55% <64.55%> (ø)
smtp/auth_plain.go 81.81% <81.81%> (ø)
smtp/auth_cram_md5.go 91.66% <91.66%> (ø)
client.go 78.04% <100.00%> (-0.90%) ⬇️
smtp/auth.go 100.00% <100.00%> (ø)
smtp/auth_login.go 96.00% <100.00%> (ø)
smtp/smtp_ehlo.go 100.00% <100.00%> (ø)

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@wneessen wneessen merged commit 813020f into main Jan 13, 2023
@wneessen wneessen deleted the feature/97_fork-the-netsmtp-package-from-stdlib-into-go-mail branch January 13, 2023 16:51
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.

Fork the net/smtp package from stdlib into go-mail
2 participants