Elixir 如何称呼:长生不老药中的mimemail?

Elixir 如何称呼:长生不老药中的mimemail?,elixir,phoenix-framework,Elixir,Phoenix Framework,调用中的:mimemail.encode。如果它在mix phoenix.server中运行,则可以正常工作,但在发布环境(使用mix-release构建)中无法调用它。它会发生以下错误: (UndefinedFunctionError) undefined function :mimemail.encode/1 (module :mimemail is not available) 是否有任何配置可在exrm env中调用它,或者缺少要配置的内容 [更新] my mix.exs中的应用程序和

调用中的
:mimemail.encode
。如果它在
mix phoenix.server
中运行,则可以正常工作,但在发布环境(使用
mix-release
构建)中无法调用它。它会发生以下错误:

(UndefinedFunctionError) undefined function :mimemail.encode/1 (module :mimemail is not available)
是否有任何配置可在exrm env中调用它,或者缺少要配置的内容

[更新] my mix.exs中的
应用程序
deps
如下:

 def application do
    [mod: {NeoSmslife, []},
     applications: [:phoenix, :phoenix_html, :cowboy, :logger, :gettext,
                    :phoenix_ecto, :mariaex,
                    :logger_file_backend,
                    :tzdata,
                    :ueberauth,
                    :ueberauth_facebook,
                    :ueberauth_twitter,
                    :timex,
                    :guardian,
                    :mailer,
                    :secure_random
                  ]]
  end

 defp deps do
    [{:phoenix, "~> 1.1.2"},
     {:phoenix_ecto, "~> 2.0"},
     {:mariaex, ">= 0.0.0"},
     {:phoenix_html, "~> 2.3"},
     {:phoenix_live_reload, "~> 1.0", only: :dev},
     {:gettext, "~> 0.9"},
     {:cowboy, "~> 1.0"},
     {:logger_file_backend , "~> 0.0.5"},
     {:secure_random, "~> 0.2"},
     {:mailer, github: "antp/mailer"},
     {:guardian, "~> 0.9.0"},
     {:guardian_db, "0.4.0"},
     {:ueberauth, "~> 0.2"},
     {:ueberauth_facebook, "~> 0.3.2"},
     {:oauth, github: "tim/erlang-oauth"},
     {:ueberauth_twitter, "~> 0.2"},
     {:timex, "~> 1.0.1"},
     {:mix_test_watch, "~> 0.2", only: :dev},
     {:exrm, "~> 1.0.2"}

   ]
  end

尝试添加到依赖项和应用程序列表中。我不知道如果没有对非发布版本的依赖,它为什么会工作;我的意思是,我相信在没有指定gen_smtp的情况下,您应该会出现这种错误。

发布您的mix.exs。将
gen_smtp
添加到应用程序和deps中,它可以正常工作。非常感谢。