diff --git a/api/smtp_configure.go b/api/smtp_configure.go index c801091..4be4d82 100644 --- a/api/smtp_configure.go +++ b/api/smtp_configure.go @@ -13,12 +13,16 @@ func smtpConfigure() error { password := os.Getenv("SMTP_PASSWORD") host := os.Getenv("SMTP_HOST") port := os.Getenv("SMTP_PORT") - if username == "" || password == "" || host == "" || port == "" { + if host == "" || port == "" { logger.Warningf("smtp not configured, no emails will be sent") smtpConfigured = false return nil } + if username == "" || password == "" { + logger.Warningf("no SMTP username/password set, Commento will assume they aren't required") + } + if os.Getenv("SMTP_FROM_ADDRESS") == "" { logger.Errorf("COMMENTO_SMTP_FROM_ADDRESS not set") smtpConfigured = false