class Mail::Body
def split!(boundary)
def split!(boundary) self.boundary = boundary parts = extract_parts # Make the preamble equal to the preamble (if any) self.preamble = parts[0].to_s.strip # Make the epilogue equal to the epilogue (if any) self.epilogue = parts[-1].to_s.strip parts[1...-1].to_a.each { |part| @parts << Mail::Part.new(part) } self end