mirror of
https://github.com/astaxie/beego.git
synced 2024-11-25 21:01:31 +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 {
|
if e.From == "" || len(to) == 0 {
|
||||||
return errors.New("Must specify at least one From address and one To address")
|
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 {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
e.From = from.String()
|
|
||||||
raw, err := e.Bytes()
|
raw, err := e.Bytes()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user