我正在使用这段代码:
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"]
如何获得完整的多行错误响应?
最佳答案
作为记录,此错误已得到修复:
关于golang : Read multiline error response from smtp. 发送邮件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14734999/