In lib/orif/accounts/email.ex
there’s this, taken (and adapted) from a Bamboo
example:
defmodule Orif.Accounts.Email do
use Bamboo.Phoenix, view: Orif.Accounts.EmailView
#import Bamboo.Email
def new_contact_email(name) do
new_email()
|> from("no-reply@gmail.com")
|> to("lui@gmail.com")
|> put_html_layout({OrifWeb.EmailView, "email.html"})
|> subject("Welcome!")
|> assign(:name, name)
|> render("welcome_contact.html")
end
end
For sake of understanding this:
If I don’t define a location, like for welcome_contact.html
, where should I place it? At lib/orif_web/templates/email
?
Is email.html
well placed under lib/orif_web/templates/email
?