Created
October 21, 2016 20:46
-
-
Save lasseebert/a01b14dc78a5de344036c9c01d53fd7d 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 | |
@from "[email protected]" | |
@mailer_impl Application.fetch_env!(:my_app, :mailer) | |
defmodule Behaviour do | |
@callback send_mail([key: String.t]) :: :ok | |
end | |
def send_test_mail(email) do | |
:ok = @mailer_impl.send_mail( | |
to: email, | |
from: @from, | |
subject: "Test!", | |
text: "Test from MyApp" | |
) | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment