mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:27:42 +00:00
feat: add http as smtp provider (#8545)
# Which Problems Are Solved Send Email messages as a HTTP call to a relay, for own logic on handling different Email providers # How the Problems Are Solved Create endpoints under Email provider to manage SMTP and HTTP in the notification handlers. # Additional Changes Clean up old logic in command and query side to handle the general Email providers with deactivate, activate and remove. # Additional Context Partially closes #8270 --------- Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
17
internal/notification/channels/email/config.go
Normal file
17
internal/notification/channels/email/config.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package email
|
||||
|
||||
import (
|
||||
"github.com/zitadel/zitadel/internal/notification/channels/smtp"
|
||||
"github.com/zitadel/zitadel/internal/notification/channels/webhook"
|
||||
)
|
||||
|
||||
type Config struct {
|
||||
ProviderConfig *Provider
|
||||
SMTPConfig *smtp.Config
|
||||
WebhookConfig *webhook.Config
|
||||
}
|
||||
|
||||
type Provider struct {
|
||||
ID string `json:"id,omitempty"`
|
||||
Description string `json:"description,omitempty"`
|
||||
}
|
@@ -1,7 +1,6 @@
|
||||
package smtp
|
||||
|
||||
type Config struct {
|
||||
Description string
|
||||
SMTP SMTP
|
||||
Tls bool
|
||||
From string
|
||||
@@ -18,3 +17,7 @@ type SMTP struct {
|
||||
func (smtp *SMTP) HasAuth() bool {
|
||||
return smtp.User != "" && smtp.Password != ""
|
||||
}
|
||||
|
||||
type ConfigHTTP struct {
|
||||
Endpoint string
|
||||
}
|
||||
|
Reference in New Issue
Block a user