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

Update to the latest Email shard. #18

Merged
merged 1 commit into from
Jan 17, 2024
Merged

Update to the latest Email shard. #18

merged 1 commit into from
Jan 17, 2024

Conversation

jwoertink
Copy link
Member

Fixes #7
Closes #9

According to This post the HELO value should be where you're sending the email from.

Looking at how it's handled in Ruby, the Net::SMTP gem used to be a part of the Ruby core, and originally used localhost as the default value https://docs.ruby-lang.org/en/2.4.0/Net/SMTP.html At some point, this gem was abstracted to a separate library, and since then, they made the decision to default this value to nil.

https://github.com/ruby/net-smtp/blob/c41e2990d68338e60a4234c1d56f223aa6d164d2/lib/net/smtp.rb#L517

Since the CrystalEmail shard requires a string value for helo_domain, I think we can just keep our default as nil, and then just pass in the host value.

https://github.com/arcage/crystal-email/blob/2f6ee366e6fd2ea24ed1df484eaab39e19ffdc0b/src/email/client/config.cr#L150

My guess is most people will use SMTP to send to a mail relay service like SendGrid, or Gmail, and those will handle their own helo_domain internally.

@jwoertink jwoertink merged commit 607d274 into main Jan 17, 2024
4 checks passed
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.

Upgrading to Email 0.7.0 fails to compile
1 participant