summaryrefslogtreecommitdiff
path: root/internal/configuration/provider.go
diff options
context:
space:
mode:
authorJames Elliott <james-d-elliott@users.noreply.github.com>2021-11-30 22:15:21 +1100
committerGitHub <noreply@github.com>2021-11-30 22:15:21 +1100
commitab8f9b0697efe4987c76a3ca2d4758b35ac8f2ad (patch)
tree2eebbb5b4fc46ab3302c117d355d8d333350e450 /internal/configuration/provider.go
parent568f210b2b764ebc0a18295bdf0589b66e9291d9 (diff)
fix(notifier): force use of sender email in smtp from cmd (#2616)
This change addresses an issue with the usage of the full sender configuration option in the MAIL FROM SMTP command. If a user includes a name in the sender this shouldn't be sent in the MAIL FROM command, instead we should extract it and use just the email portion. Fixes #2571
Diffstat (limited to 'internal/configuration/provider.go')
-rw-r--r--internal/configuration/provider.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/internal/configuration/provider.go b/internal/configuration/provider.go
index 5317991cc..ba7243ee0 100644
--- a/internal/configuration/provider.go
+++ b/internal/configuration/provider.go
@@ -45,6 +45,7 @@ func unmarshal(ko *koanf.Koanf, val *schema.StructValidator, path string, o inte
DecodeHook: mapstructure.ComposeDecodeHookFunc(
mapstructure.StringToTimeDurationHookFunc(),
mapstructure.StringToSliceHookFunc(","),
+ StringToMailAddressFunc(),
),
Metadata: nil,
Result: o,