From e7cac1bca97d22792155bfb750b89e3e0fab8d29 Mon Sep 17 00:00:00 2001 From: Rodrigue Chakode Date: Sun, 17 May 2020 21:53:56 +0200 Subject: [PATCH] updated config varible name updated config varible name --- app.yaml.sample | 6 +++--- sendmail.go | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app.yaml.sample b/app.yaml.sample index 1188fd8..f96752a 100644 --- a/app.yaml.sample +++ b/app.yaml.sample @@ -5,7 +5,7 @@ env_variables: SMTP_VERITY_CERT: true SMTP_CLIENT_USERNAME: "postmaster@example.com" SMTP_CLIENT_PASSWORD: "postmasterSecretPassWord" - ALLOWED_ORIGINS: "127.0.0.1,example.com" CONTACT_REPLY_EMAIL: "noreply@example.com" - CONTACT_REPLY_CC_EMAIL: "contact@example.com" - DEMO_URL: "https://demo.example.com/" \ No newline at end of file + CONTACT_REPLY_BCC_EMAIL: "contact@example.com" + DEMO_URL: "https://demo.example.com/" + ALLOWED_ORIGINS: "127.0.0.1,example.com" \ No newline at end of file diff --git a/sendmail.go b/sendmail.go index 6a5dda6..25453da 100644 --- a/sendmail.go +++ b/sendmail.go @@ -188,9 +188,9 @@ func SendMail(httpResp http.ResponseWriter, httpReq *http.Request) { var recipients []string switch contactRequest.RequestTarget { case "demo": - recipients = []string{contactRequest.Email, viper.GetString("CONTACT_REPLY_CC_EMAIL")} + recipients = []string{contactRequest.Email, viper.GetString("CONTACT_REPLY_BCC_EMAIL")} case "contact": - recipients = []string{viper.GetString("CONTACT_REPLY_CC_EMAIL")} + recipients = []string{viper.GetString("CONTACT_REPLY_BCC_EMAIL")} default: log.Infoln("not allowed request type:", contactRequest.RequestTarget) httpResp.WriteHeader(http.StatusForbidden) @@ -236,7 +236,7 @@ func SendMail(httpResp http.ResponseWriter, httpReq *http.Request) { if err != nil { log.Infof("error: %s", err.Error()) contactResponse.Status = "error" - contactResponse.Message = fmt.Sprintf("An internal error occurred, please try later or send us an email at %s.", viper.GetString("CONTACT_REPLY_CC_EMAIL")) + contactResponse.Message = fmt.Sprintf("An internal error occurred, please try later or send us an email at %s.", viper.GetString("CONTACT_REPLY_BCC_EMAIL")) } else { contactResponse.Status = "success" if contactRequest.RequestTarget == "demo" {