From d7f2c738c8d46b4461053b5d632e92c0b7e81473 Mon Sep 17 00:00:00 2001 From: astaxie Date: Wed, 8 Jan 2014 22:35:42 +0800 Subject: [PATCH] add attach file --- utils/mail_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/utils/mail_test.go b/utils/mail_test.go index a75c8681..c0535ed5 100644 --- a/utils/mail_test.go +++ b/utils/mail_test.go @@ -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 = "

Fancy Html is supported, too!

" + mail.AttachFile("/Users/astaxie/github/beego/beego.go") mail.Send() }