相关疑难解决方法(0)

Gmail:530 5.5.1需要验证.了解更多信息

此Go程序从我的家用计算机成功发送电子邮件,但在DigitalOcean上的虚拟服务器上收到以下错误:

panic: 530 5.5.1 Authentication Required. Learn more at
Run Code Online (Sandbox Code Playgroud)

这是代码:

auth := smtp.PlainAuth("", "bjorkbjorksen@gmail.com", "PASSWORD", "smtp.gmail.com")
msg := "Subject: Hello\r\n\r\nWorld!"
e = smtp.SendMail("smtp.gmail.com:587", auth, "bjorkbjorksen@gmail.com", []string{email}, []byte(msg))
if e != nil { panic(e) }
Run Code Online (Sandbox Code Playgroud)

gmail smtp go smtp-auth

37
推荐指数
3
解决办法
13万
查看次数

标签 统计

gmail ×1

go ×1

smtp ×1

smtp-auth ×1