jordan-wright / email

Robust and flexible email library for Go
MIT License
2.65k stars 321 forks source link

Add pool.SetHelloHostname() to override SMTP HELO hostname (FQDN) #101

Closed knadh closed 4 years ago

knadh commented 4 years ago

By default, Go's smtp lib uses "localhost" when issuing a HELO to SMTP servers (See https://github.com/mailhog/MailHog/issues/257). Some SMTP servers reject this demanding an FQDN instead.

This PR adds a new method pool.SetHelloHostname() that instructs smtp.Client to use a custom hostname.

jordan-wright commented 4 years ago

LGTM - thanks @knadh!