summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormcheng89 <mcheng827@gmail.com>2014-10-31 21:52:03 -0400
committermcheng89 <mcheng827@gmail.com>2014-10-31 21:52:03 -0400
commitb9881d1e7b88d0a8dc5c3cfb9e8f2d02b6529bfa (patch)
treeaaa1f0dcf10e568db8b68bafc67bd67af8658c74
parent87be4623cf8c5f7ad580c6467750d424d7132f77 (diff)
downloadgitea-b9881d1e7b88d0a8dc5c3cfb9e8f2d02b6529bfa.tar.gz
gitea-b9881d1e7b88d0a8dc5c3cfb9e8f2d02b6529bfa.zip
check for smtp AUTH extension
-rw-r--r--modules/mailer/mailer.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/mailer/mailer.go b/modules/mailer/mailer.go
index 758792a351..df3efb610b 100644
--- a/modules/mailer/mailer.go
+++ b/modules/mailer/mailer.go
@@ -82,7 +82,7 @@ func sendMail(hostAddressWithPort string, auth smtp.Auth, from string, recipient
return err
}
- if auth != nil {
+ if ok, _ := client.Extension("AUTH"); ok && auth != nil {
if err = client.Auth(auth); err != nil {
return err
}