Fix email config not reading from env vars
Viper requires SetDefault to be called for env vars to be automatically bound. Added defaults for EMAIL_HOST_USER and EMAIL_HOST_PASSWORD. Also added info logging to show email config on startup for debugging. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -209,6 +209,8 @@ func setDefaults() {
|
||||
viper.SetDefault("EMAIL_HOST", "smtp.gmail.com")
|
||||
viper.SetDefault("EMAIL_PORT", 587)
|
||||
viper.SetDefault("EMAIL_USE_TLS", true)
|
||||
viper.SetDefault("EMAIL_HOST_USER", "")
|
||||
viper.SetDefault("EMAIL_HOST_PASSWORD", "")
|
||||
viper.SetDefault("DEFAULT_FROM_EMAIL", "MyCrib <noreply@mycrib.com>")
|
||||
|
||||
// Push notification defaults
|
||||
|
||||
Reference in New Issue
Block a user