0
0
Fork 0
mirror of https://github.com/go-gitea/gitea synced 2024-11-15 14:31:41 +01:00

check for smtp AUTH extension

This commit is contained in:
mcheng89 2014-10-31 21:52:03 -04:00
parent 87be4623cf
commit b9881d1e7b

View file

@ -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
}