email improvements

This commit is contained in:
Hayden 2024-03-02 12:02:41 -06:00
parent 6fd8457e5a
commit 29e30bfaba
No known key found for this signature in database
GPG key ID: 17CF79474E257545
47 changed files with 3710 additions and 95 deletions

View file

@ -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"`
}

View file

@ -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 != ""
}