       unsent_email = Bamboo.Email.new_email(subject: "something else")
       assert_delivered_email(unsent_email) # Will fail
   """
-  defmacro assert_delivered_email(email, opts \\ []) do
-    quote do
-      import ExUnit.Assertions
-      email = Bamboo.Test.normalize_for_testing(unquote(email))
-      timeout = Bamboo.Test.get_timeout(unquote(opts))
-
-      assert_receive(
-        {:delivered_email, ^email},
-        timeout,
-        Bamboo.Test.flunk_with_email_list(email)
-      )
-    end
+  def assert_delivered_email(email, opts \\ []) do
+    email = normalize_for_testing(email)
+    timeout = get_timeout(opts)
+    assert_receive({:delivered_email, ^email}, timeout, flunk_with_email_list(email))
   end
 
   @doc """

    """)
  end

  @doc false
  def flunk_attributes_do_not_match(params_given, params_received) do
    """
    The parameters given do not match.


      assert_email_delivered_with(text_body: ~r/love/) # Will pass
      assert_email_delivered_with(text_body: ~r/like/) # Will fail
  """
  def assert_email_delivered_with(email_params, opts \\ []) do
    timeout = get_timeout(opts)
    assert_receive({:delivered_email, email}, timeout, flunk_no_emails_received())

    received_email_params = email |> Map.from_struct()

    assert Enum.all?(email_params, fn {k, v} -> do_match(received_email_params[k], v, k) end),
           flunk_attributes_do_not_match(email_params, received_email_params)
  end

  @doc """
