我正在使用这段代码:
err := smtp.SendMail(
smtpHostPort,
auth,
sender,
[]string{recipient},
[]byte(message),
)
if err != nil {
log.Printf("sendSmtp: failure: %q", strings.Split(err.Error(), "\n"))
}
然而,多行错误响应似乎被截断:
2013/02/06 11:54:41 sendSmtp: failure: ["530 5.5.1 Authentication Required. Learn more at"]
如何获得完整的多行错误响应?