Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 usedlocalhost
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 tonil
.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 asnil
, and then just pass in thehost
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.