LetThereBeDwight

LetThereBeDwight

Swoosh MsGraph Adapter not finding gen_smtp

I’m attempting to utilize the new MSGraph adapter and it mostly works - the one issue I’m having is that even though I’ve got gen_smtp in my deps (and in the lock), I’m getting the error:

[error] The following dependencies are required to use Swoosh.Adapters.MsGraph:

- :gen_smtp

The error is triggered by this bit of code:

  @spec validate_dependency([module | {atom, module}]) ::
          :ok | {:error, [module | {:atom | module}]}
  def validate_dependency(required_deps) do
    if Enum.all?(required_deps, fn
         {_lib, module} -> Code.ensure_loaded?(module)
         module -> Code.ensure_loaded?(module)
       end),
       do: :ok,
       else: {:error, required_deps}
  end

And unless I go and manually update the required dependencies for that adapter to be [gen_smtp: :gen_smtp_client] as with other adapters that have any bit of similar dependency requirement, it fails with an error.

So what I’m kinda looking for help here on is twofold:

  1. Assuming the dependency definition is correct, how do I get it to pick up gen_smtp?

  2. Is the dependency definition correct? It likely only requires the client, but I’m not super aware of the internals here of how this adapter is referencing it. Even further, does this requirement make any sense at all when using the MS Graph API, since it’s really just backed by a Rest API?

Thanks for any insight someone might have on either of these!

Where Next?

Popular in Questions Top

vegabook
I’m brand new to Phoenix and I have stripped one of the demo applications to the bone. I just want to get an svg up on the screen. Here i...
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
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
alice
Hey, Just curious what are the main benefits of Elixir compared to Clojure? When is Elixir more useful than Clojure and vice versa? Th...
New
fayddelight
I tried installing elixir 1.11.2 erlang 23.3.4 via asdf in my zsh shell. Enabled the versions locally and globally. When I list them ...
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
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

New
hariharasudhan94
I would like to know what is the best IDE for elixir development?
New
JakeBecker
TL;DR: I’ve just released an implementation of Microsoft’s IDE-independent Language Server Protocol for Elixir. It adds language support ...
1144 54921 245
New
aadeshere1
I have a another noob question about loop. Since elixir is immutable, while loop is not directly possible. total = 10 while total != 0 ...
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
Patoshizzle
After calling mix ecto.create I get this error: 17:00:32.162 [error] GenServer #PID<0.412.0> terminating ** (Postgrex.Error) FATAL...
New

We're in Beta

About us Mission Statement