Issue
I will be very specific. I am building a web app using servlets. What I do is get an email object (Message) using javax.mail package, then I encapsulate this object in http response output stream. The purpose is that when pressing the specific button, the email will be downloaded in an eml format. So until this, it works. I use as file name the message subject. The problem is that when the email subject has characters like "€", the file is not downloaded. Instead, a service-request file is downloaded. Can someone help me with this?
Solution
If you want to use non-ASCII-characters in Content-Disposition, you need to encode them. See RFC 6266, Sections 4.3 and 5, for details.
Answered By - Julian Reschke