mirror of https://github.com/statping/statping
notifiers/email: Respect SSL option in Test
parent
0826f16f3d
commit
f26e0bd044
|
@ -232,9 +232,11 @@ func (u *email) OnTest() error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
err = dial.StartTLS(&tls.Config{InsecureSkipVerify: true})
|
||||
if err != nil {
|
||||
return err
|
||||
if u.ApiKey != "true" {
|
||||
err = dial.StartTLS(&tls.Config{InsecureSkipVerify: true})
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
if u.Username != "" || u.Password != "" {
|
||||
auth := smtp.PlainAuth("", u.Username, u.Password, host)
|
||||
|
|
Loading…
Reference in New Issue