add attach file

This commit is contained in:
astaxie 2014-01-08 22:35:42 +08:00
parent d06c04277f
commit d7f2c738c8
1 changed files with 3 additions and 0 deletions

View File

@ -20,5 +20,8 @@ func TestMail(t *testing.T) {
mail.To = []string{"xiemengjun@gmail.com"}
mail.From = "astaxie@gmail.com"
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()
}