Browse Source

check for smtp AUTH extension

for-closed-social
mcheng89 10 years ago
parent
commit
b9881d1e7b
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      modules/mailer/mailer.go

+ 1
- 1
modules/mailer/mailer.go 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
}

Loading…
Cancel
Save