[bug] email app incorrectly handles "Content-Disposition: inline"

asked 2015-06-19 21:33:53 +0300

ScumCoder gravatar image

If an e-mail has several parts (i.e. is Content-Type: multipart/mixed), and the last part is Content-Disposition: inline with some renderable attachment type (like Content-Type: text/html), then this last part is rendered over all others.

Example:

Content-Type: multipart/mixed;
    boundary="----==--bound.112316.web25g.yandex.ru"
Return-Path: scumcoder@yandex.ru


------==--bound.112316.web25g.yandex.ru
Content-Transfer-Encoding: 8bit
Content-Type: text/plain; charset=koi8-r

[WALL OF TEXT HERE]

------==--bound.112316.web25g.yandex.ru
Content-Disposition: inline;
    filename="narod_attachment_links.html"
Content-Transfer-Encoding: 7bit
Content-Type: text/html; charset=UTF-8;
    name="narod_attachment_links.html"

<html><head><meta charset="utf-8"/></head><body><br><a class="narod-attachment" target="_blank" href="some url here">Korea.zip (54965379)</a><br></body></html>
------==--bound.112316.web25g.yandex.ru--

Instead of seeing the e-mail text and then the attachment, I see just this: image description

This is kinda frustrating.

edit retag flag offensive close delete