-
Notifications
You must be signed in to change notification settings - Fork 18k
net/smtp: timeout support similar to net.DialTimeout #16436
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Labels
Comments
Sorry, the SMTP package is frozen. Please fork it and add features on Github. We should have never included it in the standard library. I'll keep this bug open to document that it's frozen though. We'll fix bugs but not add features. |
OK sounds good - thanks for the quick reply. I worked around it by passing in the net client: // Dial the tcp connection
conn, err := net.DialTimeout("tcp", addr, 10*time.Second)
if err != nil {
return "", err
}
// Connect to the SMTP server
c, err := smtp.NewClient(conn, host)
if err != nil {
return "", err
}
defer c.Quit() |
CL https://golang.org/cl/25080 mentions this issue. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Similar to the addition of
DialTimeout
tonet
package:#240
go/src/pkg/net/dial.go
Line 78 in 964309e
Would be nice to add some symmetry with
DialTimeout
forsmtp
package:https://github.com/golang/go/blob/master/src/net/smtp/smtp.go#L43-L45
The text was updated successfully, but these errors were encountered: