1
0

fix(mail): do not fail testmail command when the connection could not be closed.

Resolves https://github.com/go-vikunja/vikunja/issues/300

(cherry picked from commit 40bb86bee59585f827752e96c87e5e8c8f81495c)
This commit is contained in:
kolaente
2024-08-12 11:05:56 +02:00
parent 42ba9240b0
commit 950de7c954
2 changed files with 7 additions and 4 deletions

View File

@ -18,6 +18,7 @@ package mail
import (
"embed"
"fmt"
"io"
"code.vikunja.io/api/pkg/config"
@ -60,8 +61,7 @@ type header struct {
// It works without a queue.
func SendTestMail(opts *Opts) error {
if config.MailerHost.GetString() == "" {
log.Warning("Mailer seems to be not configured! Please see the config docs for more details.")
return nil
return fmt.Errorf("mailer is not configured! Please see the config docs for more details")
}
c, err := getClient()