From b211cd72b7bce28364e3e6ebe734192d17143f45 Mon Sep 17 00:00:00 2001 From: mpl Date: Thu, 15 Dec 2016 17:19:30 +0100 Subject: [PATCH] website: log when SMTP down Change-Id: I37f9e6f72db04ef48d3e45226f6bd0223e998ed7 --- website/email.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/website/email.go b/website/email.go index 198573e76..4abfa5659 100644 --- a/website/email.go +++ b/website/email.go @@ -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()