Closed bronze1man closed 9 years ago
Can you show your code? Have you tried this workaround: https://github.com/go-gomail/gomail#x509-certificate-signed-by-unknown-authority
I do not try that workaround.Thanks.
I have tried the workaround. It does not work. I looks like it is not an tls error. I first get 535 Authentication failed Then get EOF. The weird thing is that my password and username is currect.
Is there an English documentation on how to send emails using QQ's SMTP?
You can also try to use the LOGIN mechanism: https://github.com/go-gomail/gomail#504-574-unrecognized-authentication-type
LOGIN mechanism does not work
func sendToQq()(err error){
addr:="xxx@qq.com"
msg := gomail.NewMessage()
msg.SetHeader("From", addr)
msg.SetHeader("To", addr)
msg.SetHeader("Subject", "测试邮件1")
msg.SetBody("text/html", "测试邮件2")
auth := gomail.LoginAuth("xxx", "xxx", "smtp.qq.com")
mailer := gomail.NewCustomMailer("smtp.qq.com:587", auth,gomail.SetTLSConfig(&tls.Config{InsecureSkipVerify: true}))
//mailer:=gomail.NewMailer("smtp.qq.com","xxx","xxxx",587,
//gomail.SetTLSConfig(&tls.Config{InsecureSkipVerify: true}))
return mailer.Send(msg)
}
Here is the document http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=28&&no=331. It says to use smtp.qq.com port 465 or 587 and ssl to send email. use imap.qq.com port 993 and ssl to recevie email. use your username without @qq.com as account name to login if you are not vip account.
I can not use it with my iphone either. I think it is qq's fault,it is not this library fault.
Have you tried port 465?
It return a 535 Authentication failed
again.
Ok I guess you should contact QQ's support then.
Thanks for your time. it turn out that it is my fault. I should study it longer before ask it in the issue.
Thanks for your time. it turn out that it is my fault. I should study it longer before ask it in the issue.
Hello, how did you resolve the EOF error returned by sending QQ emails? I have also encountered this issue recently
sorry i forgot. some tips: EOF means remote program close the connection . It maybe you protocol is not correct, you can use wireshark to verify it.
sorry i forgot. some tips: EOF means remote program close the connection . It maybe you protocol is not correct, you can use wireshark to verify it.
Thank you very much for your prompt. I have solved this problem!
I always get a EOF error. I have tcpdumped the traffic. The connect is reset when it using tls.