mirror of https://github.com/perkeep/perkeep.git
website: log when SMTP down
Change-Id: I37f9e6f72db04ef48d3e45226f6bd0223e998ed7
This commit is contained in:
parent
b3d21d7faa
commit
b211cd72b7
|
@ -97,8 +97,12 @@ func emailCommit(dir, hash string) (err error) {
|
|||
subj = subj[:80]
|
||||
}
|
||||
|
||||
if *smtpServer == "" {
|
||||
return nil
|
||||
}
|
||||
cl, err := smtp.Dial(*smtpServer)
|
||||
if err != nil {
|
||||
log.Printf("Error connecting to SMTP server for sending commit e-mail: %v", err)
|
||||
return
|
||||
}
|
||||
defer cl.Quit()
|
||||
|
|
Loading…
Reference in New Issue