defmodule Mix.Tasks.Bamboo.StartEmailPreview do use Mix.Task @moduledoc false # This coud be used in the future by the public, but right now it's only # suitable for development. def run(_) do Mix.Task.run "app.start" {:ok, _} = Application.ensure_all_started(:cowboy) Plug.Adapters.Cowboy.http Bamboo.EmailPreviewPlug, [], port: 4003 for index <- 0..5 do Bamboo.Email.new_email( from: "me@gmail.com", to: "someone@foo.com", subject: "#{index} - This is a long subject for testing truncation", html_body: """ Check different tag styling