diff --git a/README.md b/README.md index a5a1792..daeef79 100644 --- a/README.md +++ b/README.md @@ -45,40 +45,7 @@ func main() { } ``` -If you need more control, you can use `Client` instead. For example, if you -want to send an email via a server without TLS or auth support, you can do -something like this: - -```go -package main - -import ( - "log" - "strings" - - "github.com/emersion/go-smtp" -) - -func main() { - // Setup an unencrypted connection to a local mail server. - c, err := smtp.Dial("localhost:25") - if err != nil { - return err - } - defer c.Close() - - // Set the sender and recipient, and send the email all in one step. - to := []string{"recipient@example.net"} - msg := strings.NewReader("To: recipient@example.net\r\n" + - "Subject: discount Gophers!\r\n" + - "\r\n" + - "This is the email body.\r\n") - err := c.SendMail("sender@example.org", to, msg) - if err != nil { - log.Fatal(err) - } -} -``` +If you need more control, you can use `Client` instead. ### Server