We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4175bc8 commit 66d1a69Copy full SHA for 66d1a69
coderd/notifications/dispatch/smtp.go
@@ -520,11 +520,12 @@ func (s *SMTPHandler) validateToAddrs(to string) ([]string, error) {
520
// Does not allow overriding.
521
// nolint:revive // documented.
522
func (s *SMTPHandler) smarthost() (string, string, error) {
523
- if s.cfg.Smarthost.String() == "" {
+ hostport := strings.TrimSpace(s.cfg.Smarthost.String())
524
+ if hostport == "" {
525
return "", "", ValidationNoSmarthostErr
526
}
527
- host, port, err := net.SplitHostPort(s.cfg.Smarthost.String())
528
+ host, port, err := net.SplitHostPort(hostport)
529
if err != nil {
530
return "", "", xerrors.Errorf("split host port: %w", err)
531
0 commit comments