update
This commit is contained in:
@@ -11,6 +11,7 @@ import (
|
||||
"net/http"
|
||||
"net/smtp"
|
||||
"reflect"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/go-playground/validator/v10"
|
||||
@@ -76,9 +77,11 @@ func FormatSince(t time.Time) string {
|
||||
func SendEmail(to []string, cc []string, name, subject, message, htmlString string) error {
|
||||
sender := "From: HIS <hats.nutech@gmail.com>\n"
|
||||
subjectt := "Subject: " + subject + "\n"
|
||||
mime := "MIME-version: 1.0;\nContent-Type: text/html; charset=\"UTF-8\";\n\n"
|
||||
mime := "MIME-Version: 1.0\nContent-Type: text/html; charset=\"UTF-8\";\n\n"
|
||||
body := htmlString
|
||||
messages := []byte(sender + subjectt + mime + body)
|
||||
emailTo := "To:" + strings.Join(to, ",") + "\n"
|
||||
emailCC := "Cc: " + strings.Join(cc, ",") + "\n"
|
||||
messages := []byte(sender + emailTo + emailCC + subjectt + mime + body)
|
||||
|
||||
for _, v := range cc {
|
||||
if v != "" {
|
||||
|
||||
Reference in New Issue
Block a user