Skip to content

Commit

Permalink
Add a check for zero SMTP config
Browse files Browse the repository at this point in the history
  • Loading branch information
knadh committed Jun 5, 2020
1 parent 67eb3db commit 3048ab5
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions init.go
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,9 @@ func initMessengers(m *manager.Manager) messenger.Messenger {
srv = append(srv, s)
lo.Printf("loaded SMTP: %s (%s@%s)", s.Name, s.Username, s.Host)
}
if len(srv) == 0 {
lo.Fatalf("no SMTP servers found in config")
}

// Initialize the default e-mail messenger.
msgr, err := messenger.NewEmailer(srv...)
Expand Down

0 comments on commit 3048ab5

Please sign in to comment.