mobilizon.chapril.org-mobil.../lib/mobilizon_web/email/email.ex
Thomas Citharel 8006b8e0f3
Fixes for email
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
2019-09-24 12:09:43 +02:00

22 lines
569 B
Elixir

defmodule MobilizonWeb.Email do
@moduledoc """
The Email context.
"""
use Bamboo.Phoenix, view: MobilizonWeb.EmailView
alias Mobilizon.Config
@spec base_email(keyword()) :: Bamboo.Email.t()
def base_email(args) do
instance = Config.instance_config()
new_email(args)
|> from(Config.instance_email_from())
|> put_header("Reply-To", Config.instance_email_reply_to())
|> assign(:instance, instance)
|> put_html_layout({MobilizonWeb.EmailView, "email.html"})
|> put_text_layout({MobilizonWeb.EmailView, "email.text"})
end
end