2
0
forked from drew/smtprelay

Use proper hostname instead of "localhost" for outgoing mails

This commit is contained in:
Bernhard Froehlich
2018-12-28 15:40:43 +00:00
parent a82b0faf96
commit ab850e8765

View File

@@ -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
}