/api/invite triggers sending a mail invite to the given user.

This commit is contained in:
2026-02-19 20:58:34 +01:00
parent 6b31c6023f
commit a47931f40e
7 changed files with 76 additions and 0 deletions

View File

@ -0,0 +1,13 @@
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