diff --git a/config.go b/config.go index 6608fa9..2ad726a 100644 --- a/config.go +++ b/config.go @@ -8,7 +8,7 @@ import ( type config struct { Port int `env:"PORT" envDefault:"8080"` HoneyPots []string `env:"HONEYPOTS" envDefault:"_t_email" envSeparator:","` - DefaultRecipient string `env:"DEFAULT_TO"` + DefaultRecipient string `env:"EMAIL_TO"` AllowedRecipients []string `env:"ALLOWED_TO" envSeparator:","` Sender string `env:"EMAIL_FROM"` SmtpUser string `env:"SMTP_USER"` diff --git a/config_test.go b/config_test.go index 142e160..8111460 100644 --- a/config_test.go +++ b/config_test.go @@ -28,7 +28,7 @@ func Test_parseConfig(t *testing.T) { os.Clearenv() _ = os.Setenv("PORT", "1111") _ = os.Setenv("HONEYPOTS", "pot,abc") - _ = os.Setenv("DEFAULT_TO", "mail@example.com") + _ = os.Setenv("EMAIL_TO", "mail@example.com") _ = os.Setenv("ALLOWED_TO", "mail@example.com,test@example.com") _ = os.Setenv("EMAIL_FROM", "forms@example.com") _ = os.Setenv("SMTP_USER", "test@example.com") diff --git a/mail_test.go b/mail_test.go index 0a920fd..c731a84 100644 --- a/mail_test.go +++ b/mail_test.go @@ -12,7 +12,7 @@ func Test_findRecipient(t *testing.T) { prepare := func() { os.Clearenv() _ = os.Setenv("ALLOWED_TO", "mail@example.com,test@example.com") - _ = os.Setenv("DEFAULT_TO", "mail@example.com") + _ = os.Setenv("EMAIL_TO", "mail@example.com") appConfig, _ = parseConfig() } t.Run("No recipient specified", func(t *testing.T) {