From 4ea4e0436ab66bd49e7a4b0efa422d66bee95a89 Mon Sep 17 00:00:00 2001 From: bergquist Date: Tue, 17 Jan 2017 10:36:04 +0100 Subject: [PATCH] feat(mailer): set localname to hostname Some email providers does not accept localhost in the HELO message. So we set it to hostname instead. Our hope is that should be enough for those providers who does not accept localhost. closes #7223 --- pkg/services/notifications/mailer.go | 1 + 1 file changed, 1 insertion(+) diff --git a/pkg/services/notifications/mailer.go b/pkg/services/notifications/mailer.go index 97bf75fdcb9..1ca4df8877a 100644 --- a/pkg/services/notifications/mailer.go +++ b/pkg/services/notifications/mailer.go @@ -101,6 +101,7 @@ func createDialer() (*gomail.Dialer, error) { d := gomail.NewDialer(host, iPort, setting.Smtp.User, setting.Smtp.Password) d.TLSConfig = tlsconfig + d.LocalName = setting.InstanceName return d, nil }