This Go program successfully sends email from my home computer, but the following error appears on the DigitalOcean virtual server:
panic: 530 5.5.1 Authentication Required. Learn more at
Here is the code:
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) }
go smtp gmail smtp-auth
Calder Jun 21 '13 at 4:06 on 2013-06-21 04:06
source share