Prefer content-disposition filename over the content-type filename or name. #464

wants to merge 1 commit into


None yet

5 participants


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:

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.

Unfortunately, before accepting this pull request Issue #467 should be solved.


I ran into this too. Content-Disposition preferred 👍


+1 to this!


Hey there @lawrencepit, let me know if you can do anything on #467 so we can get this merged in

@jeremy jeremy modified the milestone: 2.7.0, 2.6.0 Sep 15, 2016

@jeremy are you taking over this PR or should @Nebopolis create a mergable PR ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment