mirego / accent

The first developer-oriented translation tool. True asynchronous flow between translators and your team.
https://www.accent.reviews
BSD 3-Clause "New" or "Revised" License
1.3k stars 97 forks source link

Cannot send emails through SMTP #356

Closed esergion closed 1 year ago

esergion commented 1 year ago

Hey guys, just deployed Accent into a kubernetes cluster using canonical mirego/accent:v1.16.3 docker image, trying to invite people into a test project to check everything, but it throws error:

06:54:12.244 [warning] Expected Elixir.Accent.Hook.Outbounds.Email.perform/1 to return:

- `:ok`
- `:discard`
- `{:ok, value}`
- `{:error, reason}`,
- `{:cancel, reason}`
- `{:discard, reason}`
- `{:snooze, seconds}`

Instead received:

%Bamboo.Email{
  from: {"Accent", "%REDACTED%"},
  to: [nil: "%REDACTED%"],
  cc: [],
  bcc: [],
  subject: "Accent – Invitation to collaborate on \"test\"",
  %EMAIL_BODY_REDACTED%
  private: %{
    html_layout: {Accent.EmailLayoutView, "index.html"},
    text_layout: {Accent.EmailLayoutView, "index.text"},
    view_module: Accent.EmailView,
    view_template: :project_invite
  }
}

The job will be considered a success.

06:54:12.262 [warning] Description: 'Authenticity is not established by certificate path validation'
     Reason: 'Option {verify, verify_peer} and cacertfile/cacerts is missing'

06:54:12.270 [error] Task #PID<0.4096.0> started from #PID<0.4095.0> terminating
** (UndefinedFunctionError) function :crypto.hmac/3 is undefined or private
    (crypto 5.1.2) :crypto.hmac(:md5, "637f4f8b-ecd5-429e-94d2-d87cb82a3f31", "<4339058642789534.1685516052@p-pm-outboundg02a-aws-useast1a>")
    (gen_smtp 0.15.0) /build/deps/gen_smtp/src/smtp_util.erl:73: :smtp_util.compute_cram_digest/2
    (gen_smtp 0.15.0) /build/deps/gen_smtp/src/gen_smtp_client.erl:489: :gen_smtp_client.do_AUTH_each/5
    (gen_smtp 0.15.0) /build/deps/gen_smtp/src/gen_smtp_client.erl:452: :gen_smtp_client.try_AUTH/3
    (gen_smtp 0.15.0) /build/deps/gen_smtp/src/gen_smtp_client.erl:335: :gen_smtp_client.open_smtp_session/2
    (gen_smtp 0.15.0) /build/deps/gen_smtp/src/gen_smtp_client.erl:271: :gen_smtp_client.try_smtp_sessions/3
    (gen_smtp 0.15.0) /build/deps/gen_smtp/src/gen_smtp_client.erl:258: :gen_smtp_client.send_it/2
    (bamboo_smtp 2.1.0) lib/bamboo/adapters/smtp_adapter.ex:77: Bamboo.SMTPAdapter.deliver/2
Function: #Function<0.22505923/0 in Bamboo.TaskSupervisorStrategy.deliver_later/3>
    Args: []

seems like bamboo_smtp should be updated, since 2.1.0 is 4 years old and the latest release is 4.2.2

simonprev commented 1 year ago

bamboo_smtp, bamboo and gen_smtp have been updated in the next release 1.17.0 😄 🤞