class Mail::Message

def init_with_hash(hash)

def init_with_hash(hash)
  passed_in_options = IndifferentHash.new(hash)
  self.raw_source = ''
  @header = Mail::Header.new
  @body = Mail::Body.new
  @body_raw = nil
  # We need to store the body until last, as we need all headers added first
  body_content = nil
  passed_in_options.each_pair do |k,v|
    k = Utilities.underscoreize(k).to_sym if k.class == String
    if k == :headers
      self.headers(v)
    elsif k == :body
      body_content = v
    else
      self[k] = v
    end
  end
  if body_content
    self.body = body_content
    if has_content_transfer_encoding?
        body.encoding = content_transfer_encoding
    end
  end
end