Michael M Slusarz <slusarz <at> horde.org> writes: > > Quoting Jan Schneider <jan <at> horde.org>: > > > > > I think it uses the file name provide by the message part headers. > > More specifically, it uses the file name provided by first the > 'filename' parameter of Content-Disposition, then the 'name' parameter > of Content-Type, then the Content-Description header, and finally the > MIME subtype. > > michael > > ___________________________________ > Michael Slusarz [slusarz <at> horde.org] >
Thanks Michael and Jan. Yes, Below are the headers of samples: ============================================================== Sample A (sending via old version of Horde (Horde Groupware Webmail Edition 1.2.9) MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_4odon3t0zmn" Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.3.9) This message is in MIME format. --=_4odon3t0zmn Content-Type: text/plain; charset=UTF-8 Content-Description: Plaintext Version of Message Content-Disposition: inline Content-Transfer-Encoding: 7bit --=_4odon3t0zmn Content-Type: text/html; charset=UTF-8 Content-Description: HTML Version of Message Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Result: The file name of download is "HTML_Version_of_Message" which I believe about "Content-Description", however is it able to add extension name for the file download? (e.g. HTML_Version_of_Message.html) ============================================================== Sample B (sending from Gmail) MIME-Version: 1.0 X-Received: by 10.58.211.227 with SMTP id nf3mr17997592vec.20.1373601670297; Thu, 11 Jul 2013 21:01:10 -0700 (PDT) Received: by 10.220.15.5 with HTTP; Thu, 11 Jul 2013 21:01:09 -0700 (PDT) Date: Fri, 12 Jul 2013 12:01:09 +0800 Message-ID: <cajshyw8ecn6y_pb7ata867n3xgf_fyvnead7q8tzccajy3r...@mail.gmail.com> Content-Type: multipart/alternative; boundary=047d7bd6b65a9f048b04e1488f90 --047d7bd6b65a9f048b04e1488f90 Content-Type: text/plain; charset=ISO-8859-1 test --047d7bd6b65a9f048b04e1488f90 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">test<img src=3D"data:image/jpeg;base64,/9j/4RdzRXhpZgAASUk= qAAgAAAARAAABAwABAAAAAA8AAAEBAwABAAAAYAkAAAIBAwADAAAA2gAAAAMBAwABAAAABQAAAA= YBAwABAAAAAgAAAA4BAgAWAAAA4AAAAA8BAgAGAAAA9gAAABABAgANAAAA/AAAABIBAwABAAAAA= Result: The file name of download is "Text", I believe because of no "Content-Description", it is no file extension too. I guess IMP recognize it as text because no "Content-Description", is it a bug or need to use other way to recognize the file type? -- imp mailing list Frequently Asked Questions: http://wiki.horde.org/FAQ To unsubscribe, mail: imp-unsubscr...@lists.horde.org