Commit 29f03a37 authored by Russ Cox's avatar Russ Cox

net/smtp: give example addrs in docs

Fixes #9140.

Change-Id: I3b85053262cac3c30358f8e03a5aca65dbc67623
Reviewed-on: https://go-review.googlesource.com/12231Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent 307d6919
...@@ -41,7 +41,7 @@ type Client struct { ...@@ -41,7 +41,7 @@ type Client struct {
} }
// Dial returns a new Client connected to an SMTP server at addr. // Dial returns a new Client connected to an SMTP server at addr.
// The addr must include a port number. // The addr must include a port, as in "mail.example.com:smtp".
func Dial(addr string) (*Client, error) { func Dial(addr string) (*Client, error) {
conn, err := net.Dial("tcp", addr) conn, err := net.Dial("tcp", addr)
if err != nil { if err != nil {
...@@ -281,6 +281,7 @@ var testHookStartTLS func(*tls.Config) // nil, except for tests ...@@ -281,6 +281,7 @@ var testHookStartTLS func(*tls.Config) // nil, except for tests
// possible, authenticates with the optional mechanism a if possible, // possible, authenticates with the optional mechanism a if possible,
// and then sends an email from address from, to addresses to, with // and then sends an email from address from, to addresses to, with
// message msg. // message msg.
// The addr must include a port, as in "mail.example.com:smtp".
// //
// The addresses in the to parameter are the SMTP RCPT addresses. // The addresses in the to parameter are the SMTP RCPT addresses.
// //
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment