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

2
README
View File

@ -45,7 +45,6 @@ gobyexample.com signups
= topics
* gzip
* sending email
* listing files
* regular expressions
* json parsing/unparsing
@ -54,7 +53,6 @@ gobyexample.com signups
* https server
* https client
* buffered io
* wait group
* tcp proxy
* http streaming server
* http streaming client

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