mikel/mail — Issue #297: Impossible to sort parts so attachments come last
Author: airblade
Created: 2011-11-07 08:27:06+00:00
State: open

I want to create an email with an attachment where the attachment is the last part of the email.

In my case both the text part and the attachment are plain text.

You can sort the parts of a message using `body.set_sort_order(order)` and `body.sort_parts!` -- but these only operate on the
content type header. If you have an attachment whose content type is the same as the text's, the sort won't make any difference.

Would you be open to amending `PartsList#sort!(order)` and `#get_order_value(part, order)` to use the content disposition as well? Perhaps we could allow `#get_order_value(part, order) to be overridable/pluggable so you could specify any proc you wanted for sorting?