Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions api/.env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ SMTP_CLIENT_USER=""
SMTP_CLIENT_PASSWORD=""
SMTP_CLIENT_SENDER="from@example.net"
SMTP_CLIENT_SENDER_NAME="From Name"
SMTP_CLIENT_DKIM_SELECTOR=""
SMTP_CLIENT_REPORT=""

OTP_EXPIRATION=15m
Expand Down
34 changes: 18 additions & 16 deletions api/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,14 +49,15 @@ type RedisConfig struct {
}

type SMTPClientConfig struct {
Host string
Port string
User string
Password string
Sender string
SenderName string
Report string
TokenSecret string
Host string
Port string
User string
Password string
Sender string
SenderName string
DkimSelector string
Report string
TokenSecret string
}

type ServiceConfig struct {
Expand Down Expand Up @@ -188,14 +189,15 @@ func New() (Config, error) {
TLSInsecureSkipVerify: os.Getenv("REDIS_TLS_INSECURE_SKIP_VERIFY") == "true",
},
SMTPClient: SMTPClientConfig{
Host: os.Getenv("SMTP_CLIENT_HOST"),
Port: os.Getenv("SMTP_CLIENT_PORT"),
User: os.Getenv("SMTP_CLIENT_USER"),
Password: os.Getenv("SMTP_CLIENT_PASSWORD"),
Sender: os.Getenv("SMTP_CLIENT_SENDER"),
SenderName: os.Getenv("SMTP_CLIENT_SENDER_NAME"),
Report: os.Getenv("SMTP_CLIENT_REPORT"),
TokenSecret: os.Getenv("TOKEN_SECRET"),
Host: os.Getenv("SMTP_CLIENT_HOST"),
Port: os.Getenv("SMTP_CLIENT_PORT"),
User: os.Getenv("SMTP_CLIENT_USER"),
Password: os.Getenv("SMTP_CLIENT_PASSWORD"),
Sender: os.Getenv("SMTP_CLIENT_SENDER"),
SenderName: os.Getenv("SMTP_CLIENT_SENDER_NAME"),
DkimSelector: os.Getenv("SMTP_CLIENT_DKIM_SELECTOR"),
Report: os.Getenv("SMTP_CLIENT_REPORT"),
TokenSecret: os.Getenv("TOKEN_SECRET"),
},

Service: ServiceConfig{
Expand Down
Loading
Loading