This commit is contained in:
Mark McGranaghan
2012-09-18 17:30:00 -07:00
parent e9f8486f4e
commit 28bf737ac7
2 changed files with 26 additions and 2 deletions

26
src/xx-email.go Normal file
View File

@@ -0,0 +1,26 @@
package main
import (
"net/smtp"
)
func main() {
auth := smtp.PlainAuth(
"",
"mark@heroku.com",
"xxx",
"smtp.gmail.com",
)
err := smtp.SendMail(
"smtp.gmail.com:25",
auth,
"mark+sent@heroku.com",
[]string{"mark@heroku.com"},
[]byte("The Subject\r\n\r\nThe Body"),
)
if err != nil { panic(err) }
}
// missing subject, cc, bcc, attachements, plain/multi-type emails
// https://github.com/mtoader/google-go-lang-idea-plugin/issues/112