diff options
author | Gogs <gogitservice@gmail.com> | 2015-02-20 10:12:27 +0300 |
---|---|---|
committer | Gogs <gogitservice@gmail.com> | 2015-02-20 10:12:27 +0300 |
commit | 2f1369c6147b51d0c5f82a3d236d69ac100ef8e8 (patch) | |
tree | b23cb3a61dccf39ac3356bd77c3d5c4aad2994e0 /modules/mailer/mailer.go | |
parent | 5293ae1221988d5cd0329d2a980612fb7e4df3a7 (diff) | |
download | gitea-2f1369c6147b51d0c5f82a3d236d69ac100ef8e8.tar.gz gitea-2f1369c6147b51d0c5f82a3d236d69ac100ef8e8.zip |
add error for hello func
Diffstat (limited to 'modules/mailer/mailer.go')
-rw-r--r-- | modules/mailer/mailer.go | 5 |
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") |