mirror of
https://github.com/0rangebananaspy/authelia.git
synced 2024-09-14 22:47:21 +07:00
a92b0bff1d
* add a plain text email template * use plain text email template for file based emails * add config option to SMTP emails named disable_html_emails * config option is a boolean that when set to true will only send plain text emails * add docs for more complex SMTP notifier options * update template * add rfc1341 multipart logic to notifier * check for errors after identity_verification * * fix nil ptr * go mod tidy * remove needless checks * * use multipart/atlernative instead * * add rfc5322 compliant date header * * fix linting issues
34 lines
1.6 KiB
Go
34 lines
1.6 KiB
Go
package schema
|
|
|
|
// FileSystemNotifierConfiguration represents the configuration of the notifier writing emails in a file.
|
|
type FileSystemNotifierConfiguration struct {
|
|
Filename string `mapstructure:"filename"`
|
|
}
|
|
|
|
// SMTPNotifierConfiguration represents the configuration of the SMTP server to send emails with.
|
|
type SMTPNotifierConfiguration struct {
|
|
Host string `mapstructure:"host"`
|
|
Port int `mapstructure:"port"`
|
|
Username string `mapstructure:"username"`
|
|
Password string `mapstructure:"password"`
|
|
Sender string `mapstructure:"sender"`
|
|
Subject string `mapstructure:"subject"`
|
|
TrustedCert string `mapstructure:"trusted_cert"`
|
|
StartupCheckAddress string `mapstructure:"startup_check_address"`
|
|
DisableVerifyCert bool `mapstructure:"disable_verify_cert"`
|
|
DisableRequireTLS bool `mapstructure:"disable_require_tls"`
|
|
DisableHTMLEmails bool `mapstructure:"disable_html_emails"`
|
|
}
|
|
|
|
// NotifierConfiguration represents the configuration of the notifier to use when sending notifications to users.
|
|
type NotifierConfiguration struct {
|
|
DisableStartupCheck bool `mapstructure:"disable_startup_check"`
|
|
FileSystem *FileSystemNotifierConfiguration `mapstructure:"filesystem"`
|
|
SMTP *SMTPNotifierConfiguration `mapstructure:"smtp"`
|
|
}
|
|
|
|
// DefaultSMTPNotifierConfiguration represents default configuration parameters for the SMTP notifier.
|
|
var DefaultSMTPNotifierConfiguration = SMTPNotifierConfiguration{
|
|
Subject: "[Authelia] {title}",
|
|
}
|