check smtp configurations
This commit is contained in:
parent
16d303a6fb
commit
5d17f006f0
|
@ -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}
|
||||
|
|
Loading…
Reference in New Issue