glor

glor

Bamboo SMTP with SES failed Authenfication on production

Hey guys, I’m having issues with email authorization in production environment, in development environment it works normally and the email is send.
The environment variables are correct.

This is the error that appears in Bugsnag

Erlang error: {{{:nocatch, {:permanent_failure, "530 Authentication required\r\n"}}, [{:gen_smtp_client, :try_MAIL_FROM, 4, [file: '/app/deps/gen_smtp/src/gen_smtp_client.erl', line: 360]}, {:gen_smtp_client, :try_sending_it, 4, [file: '/app/deps/gen_smtp/src/gen_smtp_client.erl', line: 341]}, {:gen_smtp_client, :send_it, 2, [file: '/app/deps/gen_smtp/src/gen_smtp_client.erl', line: 262]}, {Bamboo.SMTPAdapter, :deliver, 2, [file: 'lib/bamboo/adapters/smtp_adapter.ex', line: 77]}, {Bamboo.Mailer, :deliver_now, 4, [file: 'lib/bamboo/mailer.ex', line: 161]}

This is my configurations
config.exs

config :messenger, Messenger.Mailer.Mailer,
  adapter: Bamboo.SMTPAdapter,
  server: "email-smtp.us-east-1.amazonaws.com",
  port: 587,
  username: System.get_env("AWS_SES_ACCESS_KEY_ID"),
  password: System.get_env("AWS_SES_SECRET_ACCESS_KEY"),
  retries: 3

Mailer.ex

defmodule Messenger.Mailer.Mailer do
  use Bamboo.Mailer, otp_app: :messenger
end

mix.exs deps

 defp deps do
    [
      {:excoveralls, "~> 0.13", only: :test},
      {:jason, "~> 1.2"},
      {:joken, "~> 2.0"},
      {:bamboo, "~> 1.5.0"},
      {:bamboo_smtp, "~> 3.0"},
      {:phoenix, "~> 1.5.3"},
      {:phoenix_html, "~> 2.14.2"},
      {:ex_image_info, "~> 0.2.4"}
    ]
  end

Where Next?

Popular in Questions Top

New
lanycrost
Hi everyone! I need implement if…else if…else condition from my elixir code, and anymore of this control flow structures not work proper...
New
sen
Hi All, I set a environment variables in dev.exs , like below code. when i start server, how can i set the ${enable} value? thanks. d...
New
belgoros
I’m not a pro in using Regex and can’t figure out why the following behaviour happens, especially if we take into account the difference ...
New
bsollish-terakeet
Credo is smart enough to check for (something like) this: assert length(the_list) == 0 with this response: Checking if an enum is empt...
New
freewebwithme
Using vs code and installed ElixirLS: support and debugger. And I got an error popped up on start up says Failed to run ‘elixir’ comma...
New
SoCreat
i’m a new one to elixir which editor can i use vs code? or atom? Thanks! :smiley:
New

Other popular topics Top

nobody
Hi! In PHP: $_SERVER[‘SERVER_ADDR’] - in Elixir? Searched the docs for ip address and the web, no good results. Thanks!
New
grych
Hi folks, Few months ago I have announced the proof-of-concept of the library to manipulate the browsers DOM objects directly from Elixi...
639 54006 488
New
vonH
When I run the Plug and I recompile I wind up having to use Ctrl C to quit iex and start again. Witht the help of rlwrap I can use the cu...
New
openscript
Hello! Sorry for this astonishing simple question, but I’m really stuck. I try to set up the intellij-elixir plugin, but I don’t know ho...
New
chrismccord
Phoenix 1.4.0 released Phoenix 1.4 is out! This release ships with exciting new features, most notably with HTTP2 support, improved deve...
688 31494 112
New
Harrisonl
We have an ECS cluster with 4 services, where each task joins a single cluster, via discovery ECS discovery service. Currently when I de...
New

We're in Beta

About us Mission Statement