add attach file
Showing
1 changed file
with
3 additions
and
0 deletions
| ... | @@ -20,5 +20,8 @@ func TestMail(t *testing.T) { | ... | @@ -20,5 +20,8 @@ func TestMail(t *testing.T) { |
| 20 | mail.To = []string{"xiemengjun@gmail.com"} | 20 | mail.To = []string{"xiemengjun@gmail.com"} |
| 21 | mail.From = "astaxie@gmail.com" | 21 | mail.From = "astaxie@gmail.com" |
| 22 | mail.Subject = "hi, just from beego!" | 22 | mail.Subject = "hi, just from beego!" |
| 23 | mail.Text = "Text Body is, of course, supported!" | ||
| 24 | mail.HTML = "<h1>Fancy Html is supported, too!</h1>" | ||
| 25 | mail.AttachFile("/Users/astaxie/github/beego/beego.go") | ||
| 23 | mail.Send() | 26 | mail.Send() |
| 24 | } | 27 | } | ... | ... |
-
Please register or sign in to post a comment