defmodule BeetRoundServer.UserEmail do use Phoenix.Swoosh, template_root: "lib/beet_round_server_web/templates/emails", template_path: "invite" def invite(user) do new() |> to({user.name, user.email}) |> from({"Das GrĂ¼ne Zebra e.V.", "bietrunde@das-gruene-zebra.de"}) |> subject("Bietrunde 26/27 - Digitales Bieten") |> render_body("invite.html", %{name: user.name, invite_link: user.access_url}) end end