Skip to content

Commit

Permalink
Add TLS warning in Dial
Browse files Browse the repository at this point in the history
  • Loading branch information
emersion committed Dec 6, 2023
1 parent 0b88908 commit 7f9654d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions client.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,10 @@ const defaultTimeout = 30 * time.Second

var defaultDialer = net.Dialer{Timeout: defaultTimeout}

// Dial returns a new Client connected to an SMTP server at addr.
// The addr must include a port, as in "mail.example.com:smtp".
// Dial returns a new Client connected to an SMTP server at addr. The addr must
// include a port, as in "mail.example.com:smtp".
//
// This function returns a plaintext connection. To enable TLS, use StartTLS.
func Dial(addr string) (*Client, error) {
conn, err := defaultDialer.Dial("tcp", addr)
if err != nil {
Expand Down

0 comments on commit 7f9654d

Please sign in to comment.