Configure email in user api

This commit is contained in:
Piotr Kozimor 2021-08-09 17:25:34 +02:00
parent 9813a94220
commit e81c9c17b7
2 changed files with 26 additions and 0 deletions

View file

@ -367,6 +367,15 @@ user_api:
# The default lifetime is 3600000ms (60 minutes). # The default lifetime is 3600000ms (60 minutes).
# openid_token_lifetime_ms: 3600000 # openid_token_lifetime_ms: 3600000
# If following configuration is provided, HS will send verification emails on it's own.
email:
enabled: false
templates_path: res/default
smtp:
host: localhost:25
user: exampleusername
password: examplepassword
# Configuration for Opentracing. # Configuration for Opentracing.
# See https://github.com/matrix-org/dendrite/tree/master/docs/tracing for information on # See https://github.com/matrix-org/dendrite/tree/master/docs/tracing for information on
# how this works and how to set it up. # how this works and how to set it up.

View file

@ -19,6 +19,23 @@ type UserAPI struct {
// The Device database stores session information for the devices of logged // The Device database stores session information for the devices of logged
// in local users. It is accessed by the UserAPI. // in local users. It is accessed by the UserAPI.
DeviceDatabase DatabaseOptions `yaml:"device_database"` DeviceDatabase DatabaseOptions `yaml:"device_database"`
// The Threepid database stores information for 3PID validation sessions.
// It is accessed by the UserAPI.
ThreepidDatabase DatabaseOptions `yaml:"threepid_database"`
Email EmailConf `yaml:"email"`
}
type EmailConf struct {
Enabled bool `yaml:"enabled"`
From string `yaml:"from"`
TemplatesPath string `yaml:"templates_path"`
Smtp Smtp `yaml:"smtp"`
}
type Smtp struct {
Host string `yaml:"host"`
User string `yaml:"user"`
Password string `yaml:"password"`
} }
const DefaultOpenIDTokenLifetimeMS = 3600000 // 60 minutes const DefaultOpenIDTokenLifetimeMS = 3600000 // 60 minutes