This commit is contained in:
parent
e9f8486f4e
commit
28bf737ac7
2
README
2
README
@ -45,7 +45,6 @@ gobyexample.com signups
|
|||||||
|
|
||||||
= topics
|
= topics
|
||||||
* gzip
|
* gzip
|
||||||
* sending email
|
|
||||||
* listing files
|
* listing files
|
||||||
* regular expressions
|
* regular expressions
|
||||||
* json parsing/unparsing
|
* json parsing/unparsing
|
||||||
@ -54,7 +53,6 @@ gobyexample.com signups
|
|||||||
* https server
|
* https server
|
||||||
* https client
|
* https client
|
||||||
* buffered io
|
* buffered io
|
||||||
* wait group
|
|
||||||
* tcp proxy
|
* tcp proxy
|
||||||
* http streaming server
|
* http streaming server
|
||||||
* http streaming client
|
* http streaming client
|
||||||
|
26
src/xx-email.go
Normal file
26
src/xx-email.go
Normal 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
|
Loading…
x
Reference in New Issue
Block a user