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

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

chokchit
** (DBConnection.ConnectionError) connection not available and request was dropped from queue after 2733ms. You can configure how long re...
New
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
electic
Hi, I am new to Elixir. I am trying to use the DateTime component to insert a date into MySQL however the there seems to be no way to fo...
New
fireproofsocks
I’m working on defining a simple Ecto schema for a table (in PostGres), but I don’t see where I can define a column as NOT NULL. Conside...
New
minhajuddin
I have seen a lot of code which picks the first element from a list using Enum.at(0) instead of List.first. Is there a reason why people ...
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
aalberti333
As the title describes, I’m trying to run Enum.map() over a list of key/value pairs, where the value is a map. My data looks like this: ...
New
RisingFromAshes
I’ve read in another post that it may be possible with a router helper - but I couldn’t find an appropriate one, and tbh, I’m still just ...
New
joaquinalcerro
Hi there, I am working with Ecto-Postgresql and I need to call all of the records from a specific table but the table has 40,000 records...
New
jononomo
For some reason my phoenix channels are working for me in my local dev environment, but as soon as I deploy via Docker, I get a 403 error...
New

Other popular topics Top

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
mcarvalho
What is the difference between System.get_env and Application.get_env? For example, what are best practices to use one versus another.
New
lessless
I believe there are people here who are dealing with CSV files import on the daily basis, and since Excel is a really popular tool there ...
New
Lily
In templates/appointment/index.html.eex: &lt;%= for appointment &lt;- @appointments do %&gt; &lt;tr&gt; &lt;td&gt;&lt;%= appoi...
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
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 52341 488
New
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
nsuchy
Hi. I’ve noticed that Windows Powershell has it’s own IEX command and you cannot access Elixir’s IEX due to the conflict. This isn’t a cr...
New
klo
Got a question about when to concat vs. prepending items to list then reversing to achieve appending. So i know lists boil down to [1 | ...
New
Qqwy
Update: How to use the Blogs &amp; Podcasts section You can post links to your blog posts or podcasts either in one of the Official Blog...
3271 126479 1222
New

We're in Beta

About us Mission Statement