mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-30 11:02:16 +00:00
<!-- 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
30 lines
702 B
Go
30 lines
702 B
Go
package smtp
|
|
|
|
type Config struct {
|
|
SMTP SMTP
|
|
Tls bool
|
|
From string
|
|
FromName string
|
|
ReplyToAddress string
|
|
}
|
|
|
|
type SMTP struct {
|
|
Host string
|
|
User string
|
|
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 != ""
|
|
}
|
|
|
|
type ConfigHTTP struct {
|
|
Endpoint string
|
|
}
|