         text_body: email.text_body,
         html_body: email.html_body,
         headers: email.headers,
-        provider_options: Enum.map(email.provider_options, fn {k, v} -> %{key: k, value: inspect(v)} end),
+        provider_options:
+          Enum.map(email.provider_options, fn {k, v} -> %{key: k, value: inspect(v)} end),
         attachments: Enum.map(email.attachments, &render_attachment_json/1)
       }
     end


    get "/:id/html" do
      email = conn.assigns.storage_driver.get(id)
      conn
      |> put_resp_content_type("text/html")
      |> send_resp(200, email.html_body)

              conn
              |> put_resp_content_type(content_type)
              |> send_resp(200, data)

            %{path: path, content_type: content_type} when not is_nil(path) ->
              conn
              |> put_resp_content_type(content_type)
              |> send_resp(200, File.read!(path))

            _ ->
              conn
              |> put_resp_content_type("text/html")
              |> send_resp(500, "Attachment cannot be displayed")
          end

        _ ->
          conn
          |> put_resp_content_type("text/html")
