mirror of
https://github.com/astaxie/beego.git
synced 2024-11-22 07:50:54 +00:00
Fix utils mail from field can't including Chinese bug
This commit is contained in:
parent
57d522a96a
commit
a80feb00b8
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user