Mix.install( [ {:swoosh, "~> 1.7"}, {:gen_smtp, "~> 1.1"}, {:hackney, "~> 1.8"}, {:swoosh_mailinator, path: "."}, #app: false } ] ) defmodule Main do import Swoosh.Email import Swoosh.Mailer def main do mess = """ Compose, deliver and test your emails easily in Elixir. Swoosh comes with many adapters, including SendGrid, Mandrill, Mailgun, Postmark and SMTP. See the full list of adapters below. The complete documentation for Swoosh is available online at HexDocs. """ new() |> to("mlkjhg@kiujygtrfedc.com") |> from({"Who Knows", "who.knows@nonexisting.tld"}) |> subject("Hello, Swoosh!") |> html_body("
"<>mess<>"
") |> text_body(mess) |> IO.inspect() |> deliver([ adapter: Swoosh.Adapters.Mailinator ]) end end Main.main() |> IO.inspect()