summaryrefslogtreecommitdiffstats
path: root/modules/private/mail.go
diff options
context:
space:
mode:
Diffstat (limited to 'modules/private/mail.go')
-rw-r--r--modules/private/mail.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/private/mail.go b/modules/private/mail.go
index 675dec8f11..9c0912a6e3 100644
--- a/modules/private/mail.go
+++ b/modules/private/mail.go
@@ -5,12 +5,12 @@
package private
import (
- "encoding/json"
"fmt"
"io/ioutil"
"net/http"
"code.gitea.io/gitea/modules/setting"
+ jsoniter "github.com/json-iterator/go"
)
// Email structure holds a data for sending general emails
@@ -32,6 +32,7 @@ func SendEmail(subject, message string, to []string) (int, string) {
req := newInternalRequest(reqURL, "POST")
req = req.Header("Content-Type", "application/json")
+ json := jsoniter.ConfigCompatibleWithStandardLibrary
jsonBytes, _ := json.Marshal(Email{
Subject: subject,
Message: message,