mirror of
https://github.com/hay-kot/homebox.git
synced 2025-07-03 00:58:37 +00:00
email improvements
This commit is contained in:
parent
6fd8457e5a
commit
29e30bfaba
47 changed files with 3710 additions and 95 deletions
|
@ -18,13 +18,14 @@ const (
|
|||
|
||||
type Config struct {
|
||||
conf.Version
|
||||
Mode string `yaml:"mode" conf:"default:development"` // development or production
|
||||
Mode string `yaml:"mode" conf:"default:development"` // development or production
|
||||
Web WebConfig `yaml:"web"`
|
||||
Storage Storage `yaml:"storage"`
|
||||
Log LoggerConf `yaml:"logger"`
|
||||
Mailer MailerConf `yaml:"mailer"`
|
||||
Demo bool `yaml:"demo"`
|
||||
Debug DebugConf `yaml:"debug"`
|
||||
BaseURL string `yaml:"base_url" conf:"default:http://localhost:3000"`
|
||||
Options Options `yaml:"options"`
|
||||
}
|
||||
|
||||
|
|
|
@ -5,11 +5,11 @@ type MailerConf struct {
|
|||
Port int `conf:""`
|
||||
Username string `conf:""`
|
||||
Password string `conf:""`
|
||||
From string `conf:""`
|
||||
From string `conf:"info@example.com"`
|
||||
}
|
||||
|
||||
// Ready is a simple check to ensure that the configuration is not empty.
|
||||
// or with it's default state.
|
||||
func (mc *MailerConf) Ready() bool {
|
||||
return mc.Host != "" && mc.Port != 0 && mc.Username != "" && mc.Password != "" && mc.From != ""
|
||||
return mc.Host != "" && mc.Port != 0 && mc.From != ""
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue