Skip to content

Commit

Permalink
Update to the latest Email shard. Fixes #7 (#18)
Browse files Browse the repository at this point in the history
  • Loading branch information
jwoertink authored Jan 17, 2024
1 parent 14d04fe commit 607d274
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ dependencies:
version: ">= 0.3.0"
email:
github: arcage/crystal-email
version: ~> 0.6.1
version: ">= 0.7.0, < 0.8"
development_dependencies:
devmail:
github: tijn/devmail
Expand Down
3 changes: 2 additions & 1 deletion src/carbon/adapters/smtp_adapter.cr
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,9 @@ class Carbon::SmtpAdapter < Carbon::Adapter
def deliver_now(email : Carbon::Email)
auth = get_auth_tuple

helo_domain = settings.helo_domain || settings.host
use_tls = settings.use_tls ? ::EMail::Client::TLSMode::STARTTLS : ::EMail::Client::TLSMode::NONE
::EMail.send(settings.host, settings.port, auth: auth, use_tls: use_tls) do
::EMail.send(settings.host, settings.port, helo_domain: helo_domain, auth: auth, use_tls: use_tls) do
subject email.subject

from(email.from.address, email.from.name)
Expand Down

0 comments on commit 607d274

Please sign in to comment.