fix(cmd): report error when the connection to the mail server failed
When running the testmail command, Vikunja would not stop if it wasn't able to connect to the mail server. This was a regression from 950de7c954.
This change fixes that problem.
Resolves https://kolaente.dev/vikunja/vikunja/issues/2767
This commit is contained in:
parent
d784e98f8c
commit
b5cbe99b0a
|
|
@ -57,7 +57,7 @@ var testmailCmd = &cobra.Command{
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if err := mail.SendTestMail(opts); err != nil &&
|
if err := mail.SendTestMail(opts); err != nil &&
|
||||||
strings.HasPrefix(err.Error(), "failed to close connction: not connected to SMTP server") {
|
!strings.HasPrefix(err.Error(), "failed to close connction: not connected to SMTP server") {
|
||||||
log.Errorf("Error sending test mail: %s", err.Error())
|
log.Errorf("Error sending test mail: %s", err.Error())
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue