When I send one email with attachment, the attachment name is gibberish in Chinese.
huangfeinong opened this issue · comments
huangfeinong commented
Current Result:
Attachment File Name:???-Billing-2007-014.pdf
Code Example:
InputStream fileInput = null;
String fileName = "对账单-Billing-2007-014.pdf ";
email = email.attachment(EmailAttachment.with().name(new String(fileName.getBytes(),"utf-8")).content(fileInput,null));
Igor Spasić commented
You don't need to new String(fileName.getBytes(),"utf-8")
, just pass the fileName
(if the source code is utf8 already.
Just committed test for this
Igor Spasić commented
please see it