summaryrefslogtreecommitdiffstats
path: root/modules/mailer/mailer.go
diff options
context:
space:
mode:
authorGogs <gogitservice@gmail.com>2015-02-20 10:12:27 +0300
committerGogs <gogitservice@gmail.com>2015-02-20 10:12:27 +0300
commit2f1369c6147b51d0c5f82a3d236d69ac100ef8e8 (patch)
treeb23cb3a61dccf39ac3356bd77c3d5c4aad2994e0 /modules/mailer/mailer.go
parent5293ae1221988d5cd0329d2a980612fb7e4df3a7 (diff)
downloadgitea-2f1369c6147b51d0c5f82a3d236d69ac100ef8e8.tar.gz
gitea-2f1369c6147b51d0c5f82a3d236d69ac100ef8e8.zip
add error for hello func
Diffstat (limited to 'modules/mailer/mailer.go')
-rw-r--r--modules/mailer/mailer.go5
1 files changed, 4 insertions, 1 deletions
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")