Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make client's identity configurable #40

Closed
wants to merge 1 commit into from
Closed

Make client's identity configurable #40

wants to merge 1 commit into from

Conversation

lvillani
Copy link
Contributor

The net/smtp library sends "localhost" unless otherwise instructed. This
commit adds a new "LocalName" field to the Dialer struct that allows
users to override what gets sent with SMTP's HELO command.

@@ -14,6 +14,9 @@ type Dialer struct {
Host string
// Port represents the port of the SMTP server.
Port int
// Identity is the host name sent to the SMTP server with the HELO command.
// The default is to use "localhost".
Identity string
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you rename that LocalName?
That is how the variable is called in net/smtp. Also Identity can be confused with the identity variable of smtp.PlainAuth.

@alexcesaro
Copy link
Member

Thanks for the PR! I will merge it as soon as you fix the two points I commented.

The net/smtp library sends "localhost" unless otherwise instructed. This
commit adds a new "LocalName" field to the Dialer struct that allows
users to override what gets sent with SMTP's HELO command.
@lvillani
Copy link
Contributor Author

Just pushed a new version of the code addressing all requests.

@alexcesaro
Copy link
Member

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants