Attachement's name encoding fails
问题 I try to send an email with an attachment (A pdf file), but the receiver receives a file with a different name and without the .pdf ending. The name of the file is in Greek.. try { MimeMessage message = new MimeMessage(session); message.setFrom(new InternetAddress("from@mail.com")); message.setRecipients(Message.RecipientType.TO, InternetAddress.parse(mail)); message.setSubject(title,"utf-8"); // Create the message part BodyPart messageBodyPart = new MimeBodyPart(); // Now set the actual