Commit 5930f27d authored by miraclesu's avatar miraclesu

Fix mail Chinese subject garbled bug

parent 4de91f67
......@@ -237,6 +237,9 @@ func (e *Email) Send() error {
if len(e.From) == 0 {
e.From = from.String()
}
// use mail's RFC 5322 to encode any string
sub := mail.Address{e.Subject, ""}
e.Subject = strings.Trim(sub.String(), " <@>")
raw, err := e.Bytes()
if err != nil {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment