forked from drew/smtprelay
Use proper hostname instead of "localhost" for outgoing mails
This commit is contained in:
2
smtp.go
2
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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user