GO使用SMTP发送邮件

0412 ·
试了下, 收到邮件主题是空的 (无主题)
#3
更多评论
``` msg := []byte("To: " + to + "\r\nFrom: " + user + ">\r\nSubject: " + "\r\n" + content_type + "\r\n\r\n" + body) ``` `user+"> ` 多了一个 `>` 应改为 ``` msg := []byte("To: " + to + "\r\nFrom: " + user + "\r\nSubject: " + "\r\n" + content_type + "\r\n\r\n" + body) ```
#1
参考你的代码,出现unencrypted connection错误。查看发送的邮箱账号与密码,明文发送的,怎么生成***之类信息?
#2