Seyi

Seyi

Help setup email verification in Phoenix

I noticed the default email verifaction set by gen.auth is to save email localy, So I tried using SMTP but I have been facing some issues, I was able to fix it up to some point, but am not sure I know what’s really wrong again

here is there error log

[error] GenServer #PID<0.1077.0> terminating
** (BadMapError) expected a map, got: []
    (gen_smtp 1.2.0) :mimemail.ensure_content_headers/7
    (gen_smtp 1.2.0) c:/Users/seyi/Desktop/goolify/deps/gen_smtp/src/mimemail.erl:204: :mimemail.encode/2
    (swoosh 1.16.3) lib/swoosh/adapters/smtp.ex:55: Swoosh.Adapters.SMTP.deliver/2
    (goolify 0.1.0) lib/goolify/mailer.ex:2: anonymous fn/2 in Goolify.Mailer.instrument/3
    (telemetry 1.2.1) c:/Users/seyi/Desktop/goolify/deps/telemetry/src/telemetry.erl:321: :telemetry.span/3
    (goolify 0.1.0) lib/goolify/account/user_notifier.ex:15: Goolify.Account.UserNotifier.deliver/3
    (goolify 0.1.0) lib/goolify_web/live/user_registration_live.ex:108: GoolifyWeb.UserRegistrationLive.handle_event/3
    (phoenix_live_view 0.20.9) lib/phoenix_live_view/channel.ex:507: anonymous fn/3 in Phoenix.LiveView.Channel.view_handle_event/3
    (telemetry 1.2.1) c:/Users/seyi/Desktop/goolify/deps/telemetry/src/telemetry.erl:321: :telemetry.span/3
    (phoenix_live_view 0.20.9) lib/phoenix_live_view/channel.ex:260: Phoenix.LiveView.Channel.handle_info/2
    (stdlib 5.1.1) gen_server.erl:1077: :gen_server.try_handle_info/3
    (stdlib 5.1.1) gen_server.erl:1165: :gen_server.handle_msg/6
    (stdlib 5.1.1) proc_lib.erl:241: :proc_lib.init_p_do_apply/3

Am using Google smtp, The Config seems very fine to me and the Swoosh.Adapters.SMTP.deliver/2 is also okay, obviously I am missing something, I am new to phoenix , I will really appreciate your help.
Thanks

First Post!

benwilson512

benwilson512

Author of Craft GraphQL APIs in Elixir with Absinthe

Hi @Seyi it’s pretty hard to help if you don’t show your code.

Most Liked

kihikasamuel

kihikasamuel

For anyone looking for an answer in 2026, this link TLS + SMTP Error when using OTP/26 · Issue #785 · swoosh/swoosh · GitHub might be helpful.

Where Next?

Popular in Questions Top

baxterw3b
Hi guys, i’m new in the Elixir world, and i have to say, that i love it! i’m having some problem to understand anonymous functions with ...
New
vonH
In asking this question I am more interested about the expressiveness of the language itself and less concerned about the availability of...
New
hariharasudhan94
lets say i have a sample like a = 20; b = 10; if (a &gt; b) do {:ok, "a"} end if (a &lt; b) do {:ok, b} end if (a == b) do {:ok, "equa...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
pmjoe
I have a relationship of love and hate with Elixir. Lots of things are just absolutely right, but there are some things that are kind of ...
New
svb
Hi! Currently I want to submit a form by pressing the Enter key. However, since my input field is of type “textarea” this is just adds a...
New
senggen
Erlang/OTP 25 [erts-13.2.2] [source] [64-bit] [smp:8:8] [ds:8:8:10] [async-threads:1] 15:22:35.803 [error] gen_event {lager_file_backend...
New

Other popular topics Top

rms.mrcs
Hi, I need to transform a list of numbers into a map where the keys are the indexes and the values are the original values of the list. ...
New
KronicDeth
Elixir plugin for JetBrain’s IntelliJ Platform (including Rubymine) This is a plugin that adds support for Elixir to JetBrains IntelliJ...
289 36820 110
New
ashish173
I am using Ecto timestamps with postgres, I can see the timestamps() use the :naive_dateime but for my use case I wanted to store the ti...
New
shijith.k
I am trying to start a new phoenix project with elixir 1.9, but mix phx.new does not work. It says that ** (Mix) The task "phx.new" could...
New
albydarned
Hello all! I am typing this post from my new MacBook Pro with the M1 chip. I’m loving it so far, and will probably use it as my daily dr...
New
dblack
I’ve got an issue with an app and I’ve no idea of how to troubleshoot it. I’m hoping someone here might have seen something similar. I p...
New

We're in Beta

About us Mission Statement