From b9881d1e7b88d0a8dc5c3cfb9e8f2d02b6529bfa Mon Sep 17 00:00:00 2001 From: mcheng89 Date: Fri, 31 Oct 2014 21:52:03 -0400 Subject: [PATCH] check for smtp AUTH extension --- modules/mailer/mailer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/mailer/mailer.go b/modules/mailer/mailer.go index 758792a35159..df3efb610bc2 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 }