Multipart MIME fixes to handle metadata.

According to the Multipart MIME extension, the metadata should be
obtained from the multipart of the message, not from the preamble.