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:
@@ -57,7 +57,7 @@ var testmailCmd = &cobra.Command{
|
||||
return
|
||||
}
|
||||
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())
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user