Support send email with ssl

This commit is contained in:
lealife
2016-10-29 16:38:13 +08:00
parent 816af11db2
commit f49624d3eb
5 changed files with 108 additions and 5 deletions

25
app/tests/config_test.go Normal file
View File

@ -0,0 +1,25 @@
package tests
import (
"github.com/revel/revel"
"github.com/leanote/leanote/app/db"
"testing"
// . "github.com/leanote/leanote/app/lea"
"github.com/leanote/leanote/app/service"
// "gopkg.in/mgo.v2"
// "fmt"
)
func init() {
revel.Init("dev", "github.com/leanote/leanote", "/Users/life/Documents/Go/package_base/src")
db.Init("mongodb://localhost:27017/leanote", "leanote")
service.InitService()
service.ConfigS.InitGlobalConfigs()
}
// 测试登录
func TestSendMail(t *testing.T) {
ok, err := service.EmailS.SendEmail("life@leanote.com", "你好", "你好吗")
t.Log(ok)
t.Log(err)
}