From: Brad Fitzpatrick Date: Tue, 27 Aug 2013 23:12:11 +0000 (-0700) Subject: net/smtp: clarify that SendMail's auth param is optional X-Git-Tag: go1.2rc2~412 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=c7c1a1bbaab68a08160ed5eaea65c5947b17cf11;p=gostls13.git net/smtp: clarify that SendMail's auth param is optional It wasn't obvious that the Auth could be nil. R=golang-dev, iant CC=golang-dev https://golang.org/cl/13060048 --- diff --git a/src/pkg/net/smtp/smtp.go b/src/pkg/net/smtp/smtp.go index 212c96c1d5..a0a478a852 100644 --- a/src/pkg/net/smtp/smtp.go +++ b/src/pkg/net/smtp/smtp.go @@ -264,9 +264,10 @@ func (c *Client) Data() (io.WriteCloser, error) { return &dataCloser{c, c.Text.DotWriter()}, nil } -// SendMail connects to the server at addr, switches to TLS if possible, -// authenticates with mechanism a if possible, and then sends an email from -// address from, to addresses to, with message msg. +// SendMail connects to the server at addr, switches to TLS if +// possible, authenticates with the optional mechanism a if possible, +// and then sends an email from address from, to addresses to, with +// message msg. func SendMail(addr string, a Auth, from string, to []string, msg []byte) error { c, err := Dial(addr) if err != nil {