mirror of
https://github.com/astaxie/beego.git
synced 2024-11-26 05:11:31 +00:00
add attach file
This commit is contained in:
parent
d06c04277f
commit
d7f2c738c8
@ -20,5 +20,8 @@ func TestMail(t *testing.T) {
|
|||||||
mail.To = []string{"xiemengjun@gmail.com"}
|
mail.To = []string{"xiemengjun@gmail.com"}
|
||||||
mail.From = "astaxie@gmail.com"
|
mail.From = "astaxie@gmail.com"
|
||||||
mail.Subject = "hi, just from beego!"
|
mail.Subject = "hi, just from beego!"
|
||||||
|
mail.Text = "Text Body is, of course, supported!"
|
||||||
|
mail.HTML = "<h1>Fancy Html is supported, too!</h1>"
|
||||||
|
mail.AttachFile("/Users/astaxie/github/beego/beego.go")
|
||||||
mail.Send()
|
mail.Send()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user