        headers: %{}, html_body: nil, private: %{phoenix_template: "welcome.html"},
        provider_options: %{}, reply_to: nil, subject: "", text_body: nil, to: []}
   """
+  @spec put_private(t, atom, any) :: t
   def put_private(%__MODULE__{private: private} = email, key, value) when is_atom(key) do
     %{email | private: Map.put(private, key, value)}
   end

       private: %{}, provider_options: %{}, reply_to: nil, subject: "",
       text_body: nil, to: []}
  """
  def html_body(email, html_body), do: %{email|html_body: html_body}

  @doc """

  The name should be specified as an atom, the value can be any term.

  ## Examples

      iex> %Swoosh.Email{} |> put_provider_option(:async, true)
      %Swoosh.Email{assigns: %{}, attachments: nil, bcc: [], cc: [], from: nil,
       headers: %{}, html_body: nil, private: %{}, provider_options: %{async: true},
       reply_to: nil, subject: "", text_body: nil, to: []}
  """
  @spec put_provider_option(t, atom, any) :: t
  def put_provider_option(%__MODULE__{provider_options: provider_options} = email, key, value) when is_atom(key) do
    %{email | provider_options: Map.put(provider_options, key, value)}
  end
