mirror of
https://github.com/h44z/wg-portal.git
synced 2025-12-16 03:26:17 +00:00
allow custom mail templates (#533)
This commit is contained in:
@@ -195,6 +195,7 @@ func defaultConfig() *Config {
|
||||
From: getEnvStr("WG_PORTAL_MAIL_FROM", "Wireguard Portal <noreply@wireguard.local>"),
|
||||
LinkOnly: getEnvBool("WG_PORTAL_MAIL_LINK_ONLY", false),
|
||||
AllowPeerEmail: getEnvBool("WG_PORTAL_MAIL_ALLOW_PEER_EMAIL", false),
|
||||
TemplatesPath: getEnvStr("WG_PORTAL_MAIL_TEMPLATES_PATH", ""),
|
||||
}
|
||||
|
||||
cfg.Webhook.Url = getEnvStr("WG_PORTAL_WEBHOOK_URL", "") // no webhook by default
|
||||
|
||||
@@ -43,4 +43,8 @@ type MailConfig struct {
|
||||
LinkOnly bool `yaml:"link_only"`
|
||||
// AllowPeerEmail specifies whether emails should be sent to peers which have no valid user account linked, but an email address is set as "user".
|
||||
AllowPeerEmail bool `yaml:"allow_peer_email"`
|
||||
// TemplatesPath is an optional base path on the filesystem that contains email templates (.gotpl and .gohtml).
|
||||
// If the directory exists but is empty, the embedded default templates will be written there on startup.
|
||||
// If templates are present in the directory, they override the embedded defaults.
|
||||
TemplatesPath string `yaml:"templates_path"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user