mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-26 14:28:46 +00:00
fix: allow for the smtp-config to have no password set. (#11193)
<!-- Please inform yourself about the contribution guidelines on submitting a PR here: https://github.com/zitadel/zitadel/blob/main/CONTRIBUTING.md#submit-a-pull-request-pr. Take note of how PR/commit titles should be written and replace the template texts in the sections below. Don't remove any of the sections. It is important that the commit history clearly shows what is changed and why. Important: By submitting a contribution you agree to the terms from our Licensing Policy as described here: https://github.com/zitadel/zitadel/blob/main/LICENSING.md#community-contributions. --> # Which Problems Are Solved Adding a generic SMTP server using the gRPC endpoints resulted in an error. This was because the password field was requried. # How the Problems Are Solved Removed the requirement for a password from the mail config. # Additional Context closes #11084
This commit is contained in:
@@ -14,8 +14,14 @@ type SMTP struct {
|
||||
Password string
|
||||
}
|
||||
|
||||
// HasAuth reports whether SMTP authentication should be attempted.
|
||||
//
|
||||
// It returns true when a User is configured, regardless of whether Password
|
||||
// is set. This behavior is intentional to support SMTP servers that allow
|
||||
// authentication without a password. For servers that require a password,
|
||||
// this means authentication may still be attempted with an empty password.
|
||||
func (smtp *SMTP) HasAuth() bool {
|
||||
return smtp.User != "" && smtp.Password != ""
|
||||
return smtp.User != ""
|
||||
}
|
||||
|
||||
type ConfigHTTP struct {
|
||||
|
||||
Reference in New Issue
Block a user