View Source Swoosh.Mua
Installation
defp deps do
[
{:swoosh_mua, "~> 0.1.0"}
]
end
Usage
Application.put_env(:example, Mailer, adapter: Swoosh.Mua)
defmodule Mailer do
use Swoosh.Mailer, otp_app: :example
end
email =
Swoosh.Email.new(
from: {"Ruslan", "hey@copycat.fun"},
to: {"Ruslan", "dogaruslan@gmail.com"},
subject: "how are you?",
text_body: "I'm fine",
html_body: "I'm <i>fine</i>"
)
Mailer.deliver(email)