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)
|
osSmtpPassword := os.Getenv(constants.EnvKeySmtpPassword)
|
||||||
osSmtpLocalName := os.Getenv(constants.EnvKeySmtpLocalName)
|
osSmtpLocalName := os.Getenv(constants.EnvKeySmtpLocalName)
|
||||||
osSenderEmail := os.Getenv(constants.EnvKeySenderEmail)
|
osSenderEmail := os.Getenv(constants.EnvKeySenderEmail)
|
||||||
|
osSenderName := os.Getenv(constants.EnvKeySenderName)
|
||||||
osJwtType := os.Getenv(constants.EnvKeyJwtType)
|
osJwtType := os.Getenv(constants.EnvKeyJwtType)
|
||||||
osJwtSecret := os.Getenv(constants.EnvKeyJwtSecret)
|
osJwtSecret := os.Getenv(constants.EnvKeyJwtSecret)
|
||||||
osJwtPrivateKey := os.Getenv(constants.EnvKeyJwtPrivateKey)
|
osJwtPrivateKey := os.Getenv(constants.EnvKeyJwtPrivateKey)
|
||||||
|
@ -257,6 +258,13 @@ func InitAllEnv() error {
|
||||||
envData[constants.EnvKeySenderEmail] = osSenderEmail
|
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]
|
algoVal, ok := envData[constants.EnvKeyJwtType]
|
||||||
algo := ""
|
algo := ""
|
||||||
if !ok || algoVal == "" {
|
if !ok || algoVal == "" {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user