diff --git a/smtp.go b/smtp.go index 89c1de9..c928f5d 100644 --- a/smtp.go +++ b/smtp.go @@ -67,7 +67,7 @@ func NewClient(conn net.Conn, host string) (*Client, error) { text.Close() return nil, err } - c := &Client{Text: text, conn: conn, serverName: host, localName: "localhost"} + c := &Client{Text: text, conn: conn, serverName: host, localName: *hostName} _, c.tls = conn.(*tls.Conn) return c, nil }