diff --git a/main.go b/main.go index 13dece4..5f754a5 100644 --- a/main.go +++ b/main.go @@ -74,7 +74,7 @@ func main() { viper.SetDefault("SMTP_CLIENT_PASSWORD", "") viper.SetDefault("CONTACT_REPLY_EMAIL", "noreply@company.com") viper.SetDefault("CONTACT_REPLY_BCC_EMAIL", "contact@company.com") - viper.SetDefault("EMAIL_SUBJECT", "Thanks to try our product") + viper.SetDefault("EMAIL_SUBJECT", "New message from contact form") viper.SetDefault("SMTP_AUTHENTICATION_ENABLED", true) host := os.Getenv("HOST") diff --git a/sendmail.go b/sendmail.go index cae0fd0..9b282b1 100644 --- a/sendmail.go +++ b/sendmail.go @@ -257,7 +257,7 @@ func SendMail(httpResp http.ResponseWriter, httpReq *http.Request) { sendMailReq := NewSendMailRequest( contactEmail, recipients, - contactRequest.Subject, + viper.GetString("EMAIL_SUBJECT"), ) err := sendMailReq.ParseTemplate(replyTplFile, templateData)