mikel/mail — pull request #464 by lawrencepit (2012-11-19 09:45:04+00:00)
Title: Prefer content-disposition filename over the content-type filename or name.

Currently mail prefers content-type filename or name over content-disposition filename. I think that's undesirable. I've got a few real-world cases where it's preferable to instead primarily prefer the content-disposition filename.

Please read the following discussions:

* http://en.wikipedia.org/wiki/MIME#Content-Disposition
* http://www.imc.org/ietf-smtp/mail-archive/msg05023.html

I.e. the Content-Disposition is there to *improve* the flawed situation that exists with the Content-Type, and should therefor be preferred as the source from which to extract the filename.

From RFC2183 Content-Disposition Header Field:

```
2.3 The Filename Parameter

The sender may want to suggest a filename to be used if the entity is
detached and stored in a separate file. If the receiving MUA writes
the entity to a file, the suggested filename should be used as a
basis for the actual filename, where possible.
```