fix: properly log extra message
This commit is contained in:
parent
8fddbf43ba
commit
c19479757a
1 changed files with 4 additions and 4 deletions
|
@ -105,14 +105,14 @@ func StartMailDaemon() {
|
||||||
if !open {
|
if !open {
|
||||||
err = c.DialWithContext(context.Background())
|
err = c.DialWithContext(context.Background())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Error during connect to smtp server: %s", err)
|
log.Errorf("Error during connect to smtp server: %s", err)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
open = true
|
open = true
|
||||||
}
|
}
|
||||||
err = c.Send(m)
|
err = c.Send(m)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Error("Error when sending mail: %s", err)
|
log.Errorf("Error when sending mail: %s", err)
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
// Close the connection to the SMTP server if no email was sent in
|
// Close the connection to the SMTP server if no email was sent in
|
||||||
|
@ -122,10 +122,10 @@ func StartMailDaemon() {
|
||||||
open = false
|
open = false
|
||||||
err = c.Close()
|
err = c.Close()
|
||||||
if err != nil {
|
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
|
break
|
||||||
}
|
}
|
||||||
log.Infof("Closed connection to mail server")
|
log.Info("Closed connection to mail server")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue