Add SMTP auth to STARTTLS connections

Этот коммит содержится в:
Zvi "Viz" Effron
2015-08-23 22:13:07 -07:00
родитель 9843bcc0bf
Коммит 31d1e84411

Просмотреть файл

@@ -79,6 +79,9 @@ func newSMTPClient(conn net.Conn) (*smtp.Client, *model.AppError) {
ServerName: host,
}
c.StartTLS(tlsconfig)
if err = c.Auth(auth); err != nil {
return nil, model.NewAppError("SendMail", "Failed to authenticate on SMTP server", err.Error())
}
}
return c, nil
}