From ab850e87653216a817df9c5b10d102823b3aee37 Mon Sep 17 00:00:00 2001 From: Bernhard Froehlich Date: Fri, 28 Dec 2018 15:40:43 +0000 Subject: [PATCH] Use proper hostname instead of "localhost" for outgoing mails --- smtp.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 }