mirror of https://github.com/statping/statping
Merge pull request #156 from isundaylee/authless
Skips auth in SMTP notifier if creds are blankpull/157/head^2
commit
88f1a51356
|
@ -230,11 +230,13 @@ func (u *email) OnTest() error {
|
|||
if err != nil {
|
||||
return err
|
||||
}
|
||||
if u.Username != "" || u.Password != "" {
|
||||
auth := smtp.PlainAuth("", u.Username, u.Password, host)
|
||||
err = dial.Auth(auth)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
testService := &types.Service{
|
||||
Id: 1,
|
||||
Name: "Example Service",
|
||||
|
|
Loading…
Reference in New Issue