Skip to content

Commit 50906b8

Browse files
committed
fix: fix html user invitation email
1 parent 380a7c4 commit 50906b8

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

lib/media_server/accounts/user_notifier.ex

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ defmodule MediaServer.Accounts.UserNotifier do
1010
|> to(recipient)
1111
|> from({Application.get_env(:media_server, :app_name), Application.get_env(:media_server, :app_mailer_from)})
1212
|> subject(subject)
13-
|> text_body(body)
13+
|> html_body(body)
1414

1515
with {:ok, _metadata} <- Mailer.deliver(email) do
1616
{:ok, email}
@@ -40,20 +40,20 @@ defmodule MediaServer.Accounts.UserNotifier do
4040
def deliver_invitation_instructions(user, password) do
4141
deliver(user.email, "Invitation instructions", """
4242
43-
==============================
44-
45-
Hi #{user.name},
43+
<p>Hi #{user.name}</p>
4644
47-
An account has been created for you at #{Application.get_env(:media_server, :app_url)}.
45+
<p>An account has been created for you at:</p>
4846
49-
You're account details are:
47+
#{Application.get_env(:media_server, :app_url)}
5048
51-
Email: #{user.email}
52-
Password: #{password}
49+
<p>You're account details are:</p>
5350
54-
If you weren't expecting an account with us, please ignore this.
51+
<ul>
52+
<li>Email: #{user.email}</li>
53+
<li>Password: #{password}</li>
54+
</ul>
5555
56-
==============================
56+
<p>If you weren't expecting an account with us, please ignore this.</p>
5757
""")
5858
end
5959

0 commit comments

Comments
 (0)