Packages

Addict allows you to manage users on your Phoenix app easily. Register, login, logout, recover password and password updating is available off-the-shelf.

Current section

Files

Jump to
addict lib gateways email_gateway.ex
Raw

lib/gateways/email_gateway.ex

defmodule Addict.EmailGateway do
def send_welcome_email(user, mailer \\ Addict.MailgunMailer) do
mailer.send_email_to_user "#{user.username} <#{user.email}>",
Application.get_env(:addict, :register_from_email),
Application.get_env(:addict, :register_subject),
Application.get_env(:addict, :email_templates).register_template(user)
end
end