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

client: add new functions to specify options #266

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

rjarry
Copy link

@rjarry rjarry commented Jul 4, 2024

Expose a new set of functions to create a client with custom options.

Expose a new set of functions to create a client with custom options.

Signed-off-by: Robin Jarry <robin@jarry.cc>
@rjarry
Copy link
Author

rjarry commented Jul 11, 2024

Hi @emersion, do you have any remarks?

Since the 0.21 release, it is not possible to connect with STARTTLS and a custom local name other than localhost. Some MTAs enforce clients to expose their real hostname and reject email when the HELO contains a non FQDN.

send:: conn.Rcpt: SMTP error 504: <localhost>: Helo command rejected: need fully qualified hostname

If this PR could be applied and included in a tagged release it would be awesome :)

Thanks!

@emersion
Copy link
Owner

This commit should already fix your issue: 75e52af

This PR adds a more convenient way to set client options but doesn't add any new functionality - I'm not 100% sure it's a good idea to have 2 ways of doing the same thing...

@rjarry
Copy link
Author

rjarry commented Jul 11, 2024

Ok, this should do fine. However 75e52af it is still on master, not included in any tag yet. Could you cut a 0.21.3 version including this?

Thanks!

@emersion
Copy link
Owner

This was more tricky than just releasing a new bugfix release, because master also has another commit with breaking changes. I've established a branch for v0.21.x and released 0.21.3.

@rjarry
Copy link
Author

rjarry commented Jul 12, 2024

Thanks!

Should I close this PR or are you considering taking it in?

@emersion
Copy link
Owner

Yeah, please keep it open.

If I had to design an API from scratch, I'd probably only expose options and not expose public fields in Client.

@JokerCatz
Copy link

the default timeout toooooo long, we need this PR or something like this

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.

3 participants