mirror of
https://github.com/astaxie/beego.git
synced 2024-11-14 06:50:54 +00:00
14 lines
313 B
Go
14 lines
313 B
Go
package logs
|
|
|
|
import (
|
|
"testing"
|
|
"time"
|
|
)
|
|
|
|
func TestSmtp(t *testing.T) {
|
|
log := NewLogger(10000)
|
|
log.SetLogger("smtp", `{"username":"beegotest@gmail.com","password":"xxxxxxxx","host":"smtp.gmail.com:587","sendTos":["xiemengjun@gmail.com"]}`)
|
|
log.Critical("sendmail critical")
|
|
time.Sleep(time.Second * 30)
|
|
}
|