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: SMTP no auth support #638

Merged
merged 1 commit into from
Oct 22, 2024

Conversation

jdesnoes
Copy link
Contributor

@jdesnoes jdesnoes commented Oct 21, 2024

Description

This PR updates the go-mail dependency from v0.5.0 to v0.5.1 to fix a bug:

In few words, with go-mail v0.5.0, we can't use the SMTP client without authentification.
In my case, my SMTP server doesn't support authentification (I know, it's bad), but the library always check if it does and crash if it doesn't, even when I configure the SMTP client to don't use any kind of authentification (authentification type not set or set to "NOAUTH" for example).

This bug is now solved in the go-mail library so just updating it to the last availavble version (v0.5.1 for the moment) would fix this.

What type of PR is this? (check all applicable)

  • 🍕 Feature
  • 🐛 Bug Fix
  • 📝 Documentation Update
  • 🎨 Style
  • 🧑‍💻 Code Refactor
  • 🔥 Performance Improvements
  • ✅ Test
  • 🤖 Build
  • 🔁 CI
  • 📦 Chore (Release)
  • ⏩ Revert

Related Tickets & Documents

Screenshots/Recordings

Current error logs with no auth method:

"level":"error","ts":1729507900.153856,"caller":"http/team.go:386","msg":"handleTeamInviteUser error","version":"4.17.2","error":"failed to send mail: dial failed: server does not support SMTP AUTH"

Steps to QA

  1. Run a STMP server without authentification
  2. Run the application with the updated library and a configuration set to smtp.auth: "NOAUTH"
  3. Check in the logs that the application doesn't check the authentification method supported by the SMTP server
  4. Check the mail is sent correctly

@StevenWeathers StevenWeathers merged commit 0f594ff into StevenWeathers:main Oct 22, 2024
9 checks passed
@jdesnoes jdesnoes deleted the fix-smtp-noauth branch October 25, 2024 06:04
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.

2 participants