mirror of
https://github.com/h44z/wg-portal.git
synced 2025-08-09 23:12:24 +00:00
30 lines
848 B
Go
30 lines
848 B
Go
package config
|
|
|
|
type MailEncryption string
|
|
|
|
const (
|
|
MailEncryptionNone MailEncryption = "none"
|
|
MailEncryptionTLS MailEncryption = "tls"
|
|
MailEncryptionStartTLS MailEncryption = "starttls"
|
|
)
|
|
|
|
type MailAuthType string
|
|
|
|
const (
|
|
MailAuthPlain MailAuthType = "plain"
|
|
MailAuthLogin MailAuthType = "login"
|
|
MailAuthCramMD5 MailAuthType = "crammd5"
|
|
)
|
|
|
|
type MailConfig struct {
|
|
Host string `envconfig:"EMAIL_HOST"`
|
|
Port int `envconfig:"EMAIL_PORT"`
|
|
Encryption MailEncryption `envconfig:"EMAIL_ENCRYPTION"`
|
|
CertValidation bool `envconfig:"EMAIL_CERT_VALIDATION"`
|
|
Username string `envconfig:"EMAIL_USERNAME"`
|
|
Password string `envconfig:"EMAIL_PASSWORD"`
|
|
AuthType MailAuthType `envconfig:"EMAIL_AUTHTYPE"`
|
|
|
|
From string `envconfig:"EMAIL_FROM"`
|
|
}
|