提交 5d17f006 编写于 作者: U Ulric Qin

check smtp configurations

上级 16d303a6
......@@ -60,6 +60,11 @@ func StartEmailSender() {
conf := config.C.SMTP
if conf.Host == "" || conf.Port == 0 {
logger.Warning("SMTP configurations invalid")
return
}
d := gomail.NewDialer(conf.Host, conf.Port, conf.User, conf.Pass)
if conf.InsecureSkipVerify {
d.TLSConfig = &tls.Config{InsecureSkipVerify: true}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册