fix: properly log extra message
continuous-integration/drone/push Build is failing Details

This commit is contained in:
kolaente 2022-09-01 14:19:00 +02:00
parent 8fddbf43ba
commit c19479757a
Signed by: konrad
GPG Key ID: F40E70337AB24C9B
1 changed files with 4 additions and 4 deletions

View File

@ -105,14 +105,14 @@ func StartMailDaemon() {
if !open {
err = c.DialWithContext(context.Background())
if err != nil {
log.Error("Error during connect to smtp server: %s", err)
log.Errorf("Error during connect to smtp server: %s", err)
break
}
open = true
}
err = c.Send(m)
if err != nil {
log.Error("Error when sending mail: %s", err)
log.Errorf("Error when sending mail: %s", err)
break
}
// Close the connection to the SMTP server if no email was sent in
@ -122,10 +122,10 @@ func StartMailDaemon() {
open = false
err = c.Close()
if err != nil {
log.Error("Error closing the mail server connection: %s\n", err)
log.Errorf("Error closing the mail server connection: %s\n", err)
break
}
log.Infof("Closed connection to mail server")
log.Info("Closed connection to mail server")
}
}
}