Created
October 21, 2016 20:19
-
-
Save lasseebert/db10bbd433ebfffba71ed41ccf621c21 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
defmodule MyApp.Mailer do | |
use Mailgun.Client, [ | |
domain: Application.fetch_env!(:my_app, :mailgun_domain), | |
key: Application.fetch_env!(:my_app, :mailgun_key) | |
] | |
@from "[email protected]" | |
def send_test_mail(email) do | |
{:ok, _} = send_email [ | |
to: email, | |
from: @from, | |
subject: "Test!", | |
text: "Test from MyApp" | |
] | |
:ok | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment