sendmail: remove organization
Signed-off-by: Nicolas Froger <nicolas@kektus.xyz>
This commit is contained in:
parent
c9f97d5e70
commit
7b340cc6f4
2
main.go
2
main.go
|
@ -17,10 +17,10 @@ limitations under the License.
|
|||
package main
|
||||
|
||||
import (
|
||||
"log"
|
||||
"net/http"
|
||||
"os"
|
||||
"time"
|
||||
"log"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
)
|
||||
|
|
32
sendmail.go
32
sendmail.go
|
@ -22,12 +22,12 @@ import (
|
|||
"encoding/json"
|
||||
"fmt"
|
||||
"html/template"
|
||||
"log"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/smtp"
|
||||
"net/url"
|
||||
"strings"
|
||||
"log"
|
||||
|
||||
"github.com/dpapathanasiou/go-recaptcha"
|
||||
"github.com/spf13/viper"
|
||||
|
@ -220,13 +220,11 @@ func SendMail(httpResp http.ResponseWriter, httpReq *http.Request) {
|
|||
httpReq.ParseForm()
|
||||
|
||||
contactRequest := ContactRequest{
|
||||
Name: httpReq.FormValue("name"),
|
||||
Email: strings.TrimSpace(httpReq.FormValue("email")),
|
||||
Organization: httpReq.FormValue("organization"),
|
||||
Subject: httpReq.FormValue("subject"),
|
||||
Message: httpReq.FormValue("message"),
|
||||
RequestTarget: httpReq.FormValue("target"),
|
||||
OriginURI: httpReq.FormValue("requestOrigin"),
|
||||
Name: httpReq.FormValue("name"),
|
||||
Email: strings.TrimSpace(httpReq.FormValue("email")),
|
||||
Subject: httpReq.FormValue("subject"),
|
||||
Message: httpReq.FormValue("message"),
|
||||
OriginURI: httpReq.FormValue("requestOrigin"),
|
||||
}
|
||||
|
||||
recipients := []string{viper.GetString("CONTACT_REPLY_BCC_EMAIL")}
|
||||
|
@ -235,17 +233,15 @@ func SendMail(httpResp http.ResponseWriter, httpReq *http.Request) {
|
|||
log.Println("New Request:", string(userData))
|
||||
|
||||
templateData := struct {
|
||||
Name string
|
||||
Email string
|
||||
Organization string
|
||||
Subject string
|
||||
Message string
|
||||
Name string
|
||||
Email string
|
||||
Subject string
|
||||
Message string
|
||||
}{
|
||||
Name: contactRequest.Name,
|
||||
Email: contactRequest.Email,
|
||||
Organization: contactRequest.Organization,
|
||||
Subject: contactRequest.Subject,
|
||||
Message: contactRequest.Message,
|
||||
Name: contactRequest.Name,
|
||||
Email: contactRequest.Email,
|
||||
Subject: contactRequest.Subject,
|
||||
Message: contactRequest.Message,
|
||||
}
|
||||
|
||||
replyTplFile := viper.GetString("TEMPLATE_CONTACT_REQUEST_REPLY")
|
||||
|
|
Loading…
Reference in New Issue