add error for hello func

This commit is contained in:
Gogs 2015-02-20 10:12:27 +03:00
parent 5293ae1221
commit 2f1369c614

AI 샘플 코드 생성 중입니다

Loading...

View File

@ -100,7 +100,10 @@ func sendMail(settings *setting.Mailer, recipients []string, msgContent []byte)
if err != nil { if err != nil {
return err return err
} }
client.Hello(hostname)
if err = client.Hello(hostname); err != nil {
return err
}
// If not using SMTPS, alway use STARTTLS if available // If not using SMTPS, alway use STARTTLS if available
hasStartTLS, _ := client.Extension("STARTTLS") hasStartTLS, _ := client.Extension("STARTTLS")