summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
author无闻 <joe2010xtmf@163.com>2014-10-31 22:18:15 -0400
committer无闻 <joe2010xtmf@163.com>2014-10-31 22:18:15 -0400
commitbeb8a77fc5d77e9af16a48129995406478b4ced8 (patch)
treeaaa1f0dcf10e568db8b68bafc67bd67af8658c74
parent87be4623cf8c5f7ad580c6467750d424d7132f77 (diff)
parentb9881d1e7b88d0a8dc5c3cfb9e8f2d02b6529bfa (diff)
downloadgitea-beb8a77fc5d77e9af16a48129995406478b4ced8.tar.gz
gitea-beb8a77fc5d77e9af16a48129995406478b4ced8.zip
Merge pull request #593 from mcheng89/dev
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
}