Skip to content

Commit

Permalink
Fix SMTP stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
th0th committed Nov 18, 2024
1 parent 81d2786 commit bf5be2d
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions backend/pkg/poeticmetric/env_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ type EnvServiceVars struct {
RedisPort int `env:"REDIS_PORT,notEmpty,required"`

// SMTP
SmtpFrom string `env:"SMTP_FROM,notEmpty,required"`
SmtpHost string `env:"SMTP_HOST,notEmpty,required"`
SmtpPassword string `env:"SMTP_PASSWORD"`
SmtpPort string `env:"SMTP_PORT,notEmpty,required"`
SmtpUser string `env:"SMTP_USER"`
SmtpFromAddress string `env:"SMTP_FROM_ADDRESS,notEmpty,required"`
SmtpHost string `env:"SMTP_HOST,notEmpty,required"`
SmtpPassword string `env:"SMTP_PASSWORD"`
SmtpPort string `env:"SMTP_PORT,notEmpty,required"`
SmtpUser string `env:"SMTP_USER"`
}
2 changes: 1 addition & 1 deletion backend/pkg/service/env/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ func (s *service) SmtpAuth() smtp.Auth {
}

func (s *service) SmtpFrom() string {
return s.vars.SmtpFrom
return fmt.Sprintf("PoeticMetric <%s>", s.vars.SmtpFromAddress)
}

var Logger = zerolog.New(os.Stdout).With().Timestamp().Logger()
2 changes: 1 addition & 1 deletion chart/templates/configmap-smtp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ metadata:
{{ include "poeticmetric.labels" . | nindent 4 }}
name: {{ include "poeticmetric.fullname" . }}-smtp
data:
FROM: {{ .Values.poeticmetric.smtp.from | quote }}
FROM_ADDRESS: {{ .Values.poeticmetric.smtp.fromAddress | quote }}
HOST: {{ .Values.poeticmetric.smtp.host | quote }}
PORT: {{ .Values.poeticmetric.smtp.port | quote }}
2 changes: 1 addition & 1 deletion chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ poeticmetric:
replicas: 1
resources: {}
smtp:
from: PoeticMetric <[email protected]>
fromAddress: [email protected]
host: ""
password: ""
port: 587
Expand Down
2 changes: 1 addition & 1 deletion etc/development/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ poeticmetric:
annotations:
cert-manager.io/cluster-issuer: self-signed
smtp:
from: PoeticMetric <[email protected]>
fromAddress: [email protected]
host: poeticmetric-mailpit
port: "1025"
postgres:
Expand Down
2 changes: 1 addition & 1 deletion etc/staging/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ poeticmetric:
cert-manager.io/cluster-issuer: letsencrypt-prod-poeticmetric
resources: {}
smtp:
from: PoeticMetric <[email protected]>
fromAddress: [email protected]
host: email-smtp.eu-west-1.amazonaws.com
port: 587
redis:
Expand Down

0 comments on commit bf5be2d

Please sign in to comment.