Skip to content

fix: remove defaults for CODER_EMAIL_ options #15482

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 11 commits into from
Prev Previous commit
Next Next commit
fix: failing tests
  • Loading branch information
DanielleMaywood committed Nov 12, 2024
commit 196f53831348987f4cee4dc2581eafdf0f9eb8fe
6 changes: 1 addition & 5 deletions coderd/apidoc/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 1 addition & 5 deletions coderd/apidoc/swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 8 additions & 5 deletions coderd/notifications/dispatch/smtp.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,10 @@ import (
)

var (
ValidationNoFromAddressErr = xerrors.New("no 'from' address defined")
ValidationNoToAddressErr = xerrors.New("no 'to' address(es) defined")
ValidationNoSmarthostHostErr = xerrors.New("smarthost 'host' is not defined, or is invalid")
ValidationNoSmarthostPortErr = xerrors.New("smarthost 'port' is not defined, or is invalid")
ValidationNoHelloErr = xerrors.New("'hello' not defined")
ValidationNoFromAddressErr = xerrors.New("no 'from' address defined")
ValidationNoToAddressErr = xerrors.New("no 'to' address(es) defined")
ValidationNoSmarthostErr = xerrors.New("no 'smarthost' defined")
ValidationNoHelloErr = xerrors.New("'hello' not defined")

//go:embed smtp/html.gotmpl
htmlTemplate string
Expand Down Expand Up @@ -521,6 +520,10 @@ func (s *SMTPHandler) validateToAddrs(to string) ([]string, error) {
// Does not allow overriding.
// nolint:revive // documented.
func (s *SMTPHandler) smarthost() (string, string, error) {
if s.cfg.Smarthost.String() == "" {
return "", "", ValidationNoSmarthostErr
}

host, port, err := net.SplitHostPort(s.cfg.Smarthost.String())
if err != nil {
return "", "", fmt.Errorf("split host port: %w", err)
Expand Down
5 changes: 1 addition & 4 deletions docs/reference/api/general.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

22 changes: 5 additions & 17 deletions docs/reference/api/schemas.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 2 additions & 5 deletions docs/reference/cli/server.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.