mikel/mail — pull request #470 by DavyCardinaal (2012-11-27 14:21:31+00:00)
Title: Fix for UnstructuredField which responds to Content-Field

Recently received an e-mail which had the following content-type for an attachment:
```
Content-Type: unknown/unknown;
charset=iso-8859-1;
name=IMSTP19.gif
```

After receiving the e-mail I perform a to string on the Mail object to generate a unique hash. Something like the following:

```ruby
Mail::POP3.new(settings).find_and_delete(count: 25) do |msg|
receive(msg)
process_email_key(Digest::SHA1.hexdigest(msg.to_s))
end
```

When I received the e-mail with the content-type I noticed above I got the following error
```
undefined method `string' for unknown/unknown; name="image.gif":Mail::UnstructuredField
```

The private method ```get_order_value()``` in ```lib/mail/parts_list.rb``` assumes that the Field is a ```Mail::ContentTypeField``` when the part responds_to content-type. But with the content-type used in this e-mail the field is a ```Mail::UnstructuredField```.

The ```part[:content_type].string``` raises an error because there's no string method for an UnstructuredField.