From: Gogs Date: Fri, 20 Feb 2015 07:12:27 +0000 (+0300) Subject: add error for hello func X-Git-Tag: v0.9.99~1452^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=2f1369c6147b51d0c5f82a3d236d69ac100ef8e8;p=gitea.git add error for hello func --- diff --git a/modules/mailer/mailer.go b/modules/mailer/mailer.go index 57400e73fc..fc6ec2fa86 100644 --- a/modules/mailer/mailer.go +++ b/modules/mailer/mailer.go @@ -100,7 +100,10 @@ func sendMail(settings *setting.Mailer, recipients []string, msgContent []byte) if err != nil { return err } - client.Hello(hostname) + + if err = client.Hello(hostname); err != nil { + return err + } // If not using SMTPS, alway use STARTTLS if available hasStartTLS, _ := client.Extension("STARTTLS")