Commit a80feb00 authored by miraclesu's avatar miraclesu

Fix utils mail from field can't including Chinese bug

parent 57d522a9
......@@ -231,11 +231,10 @@ func (e *Email) Send() error {
if e.From == "" || len(to) == 0 {
return errors.New("Must specify at least one From address and one To address")
}
from, err := mail.ParseAddress(e.From)
from, err := mail.ParseAddress(e.Username)
if err != nil {
return err
}
e.From = from.String()
raw, err := e.Bytes()
if err != nil {
return err
......
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