I’m trying to setup Bamboo to send emails when a user fills up a form asking to be contacted. My problem is that I’ve not yet full understood the relation between where the modules are placed and how they should be called.
email.ex is under
lib/orif/accounts/, as well as other modules.
$ head lib/orif/accounts/mailer.ex defmodule Orif.Accounts.Mailer do use Bamboo.Mailer, otp_app: :orif end $ head lib/orif/accounts/email.ex defmodule Orif.Accounts.Email do use Bamboo.Phoenix, view: OrifWeb.EmailView def new_contact_email(name) do
emai_view.ex is under
lib/orif_web/views, as other views.
$ head lib/orif_web/views/email_view.ex defmodule Orif.Accounts.EmailView do use OrifWeb, :view end
When trying to acess the resource, the error shown is:
##### UndefinedFunctionError <small>at POST</small> <small>/contacts</small> # function OrifWeb.Accounts.EmailView.render/2 is undefined (module OrifWeb.Accounts.EmailView is not available)
What should I correct?