retrive sender name from env
This commit is contained in:
parent
17bb077f3e
commit
8dbd2556eb
8
server/env/env.go
vendored
8
server/env/env.go
vendored
|
@ -57,6 +57,7 @@ func InitAllEnv() error {
|
|||
osSmtpPassword := os.Getenv(constants.EnvKeySmtpPassword)
|
||||
osSmtpLocalName := os.Getenv(constants.EnvKeySmtpLocalName)
|
||||
osSenderEmail := os.Getenv(constants.EnvKeySenderEmail)
|
||||
osSenderName := os.Getenv(constants.EnvKeySenderName)
|
||||
osJwtType := os.Getenv(constants.EnvKeyJwtType)
|
||||
osJwtSecret := os.Getenv(constants.EnvKeyJwtSecret)
|
||||
osJwtPrivateKey := os.Getenv(constants.EnvKeyJwtPrivateKey)
|
||||
|
@ -257,6 +258,13 @@ func InitAllEnv() error {
|
|||
envData[constants.EnvKeySenderEmail] = osSenderEmail
|
||||
}
|
||||
|
||||
if val, ok := envData[constants.EnvKeySenderName]; !ok || val == "" {
|
||||
envData[constants.EnvKeySenderName] = osSenderName
|
||||
}
|
||||
if osSenderName != "" && envData[constants.EnvKeySenderName] != osSenderName {
|
||||
envData[constants.EnvKeySenderName] = osSenderName
|
||||
}
|
||||
|
||||
algoVal, ok := envData[constants.EnvKeyJwtType]
|
||||
algo := ""
|
||||
if !ok || algoVal == "" {
|
||||
|
|
Loading…
Reference in New Issue
Block a user