class Mail::Header
def fields=(unfolded_fields)
h = Header.new
Acceps an array of field string values, for example:
receives them in.
Populates the fields container with Field objects in the order it
information.
prepended to the message. See sections 3.6.6 and 3.6.7 for more
header fields MUST NOT be reordered, and SHOULD be kept in blocks
transformed. More importantly, the trace header fields and resent
fields SHOULD NOT be reordered when a message is transported or
the Internet. However, for the purposes of this standard, header
have been known to be reordered occasionally when transported over
be in a particular order. They may appear in any order, and they
It is important to note that the header fields are not guaranteed to
3.6. Field definitions
def fields=(unfolded_fields) @fields = Mail::FieldList.new if unfolded_fields.size > self.class.maximum_amount Kernel.warn "WARNING: More than #{self.class.maximum_amount} header fields; only using the first #{self.class.maximum_amount} and ignoring the rest" unfolded_fields = unfolded_fields.slice(0...self.class.maximum_amount) end unfolded_fields.each do |field| if field = Field.parse(field, charset) @fields.add_field field end end end