Skip to content

Commit 3bfe66a

Browse files
authored
fix: email region issue (#81)
1 parent 00f7626 commit 3bfe66a

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

config/runtime.exs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,4 +158,7 @@ if config_env() == :prod do
158158
access_key_id: [{:system, "AWS_ACCESS_KEY_ID"}, :pod_identity, :instance_role],
159159
secret_access_key: [{:system, "AWS_SECRET_ACCESS_KEY"}, :pod_identity, :instance_role],
160160
region: {:system, "AWS_REGION"}
161+
162+
# override the ses region to use Frankfurt since SES does not exist in eu-central-2
163+
config :ex_aws, :ses, region: "eu-central-1"
161164
end

lib/admin/mailer_worker.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ defmodule Admin.MailerWorker do
5858
{:error, :notification_not_found} ->
5959
{:cancel, :notification_not_found}
6060

61-
{:error, _} ->
62-
{:error, "Failed to send notification"}
61+
{:error, error} ->
62+
{:error, "Failed to send notification: #{inspect(error)}"}
6363
end
6464
end
6565
end

0 commit comments

Comments
 (0)