 
   ## Examples
 
-        iex> %Swoosh.Email{} |> cc("steve@rogers.com")
-        %Swoosh.Email{assigns: %{}, attachments: nil, bcc: [],
-         cc: [{"", "steve@rogers.com"}], from: nil, headers: %{}, html_body: nil,
-         private: %{}, provider_options: %{}, reply_to: nil, subject: "",
-         text_body: nil, to: []}
+      iex> %Swoosh.Email{} |> cc("steve@rogers.com")
+      %Swoosh.Email{assigns: %{}, attachments: nil, bcc: [],
+       cc: [{"", "steve@rogers.com"}], from: nil, headers: %{}, html_body: nil,
+       private: %{}, provider_options: %{}, reply_to: nil, subject: "",
+       text_body: nil, to: []}
   """
   def cc(%__MODULE__{cc: cc} = email, recipients) when is_list(recipients) do
     recipients =


  ## Examples

      iex> %Swoosh.Email{} |> put_private(:phoenix_template, "welcome.html")
      %Swoosh.Email{assigns: %{}, attachments: nil, bcc: [], cc: [], from: nil,
       headers: %{}, html_body: nil, private: %{phoenix_template: "welcome.html"},
       provider_options: %{}, reply_to: nil, subject: "", text_body: nil, to: []}
  """
  def put_private(%__MODULE__{private: private} = email, key, value) when is_atom(key) do
    %{email | private: Map.put(private, key, value)}


  ## Examples

      iex> email.provider_options[:async]
      nil
      iex> email = put_provider_option(email, :async, true)
      iex> email.provider_options[:async]
      true
  """
  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

  @doc """
  Stores a new variable key and value in the email.

  This store is meant for variables used in templating. The name should be specified as an atom, the value can be any
  term.

  ## Examples

      iex> email.assigns[:first_name]
      nil
      iex> email = assign(email, :first_name, "Steve")
      iex> email.assigns[:first_name]
      "Steve"
  """
  def assign(%__MODULE__{assigns: assigns} = email, key, value) when is_atom(key) do
    %{email | assigns: Map.put(assigns, key, value)}
  end

  defp format_recipient({name, address} = recipient) when is_binary(name) and is_binary(address) and recipient != "" do
