You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Thomas Neidhart (JIRA)" <ji...@apache.org> on 2014/05/06 20:19:20 UTC
[jira] [Commented] (EMAIL-138) Czech/Slovak diacritic marks in the
file name of the attached file screw whole sent email
[ https://issues.apache.org/jira/browse/EMAIL-138?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13990933#comment-13990933 ]
Thomas Neidhart commented on EMAIL-138:
---------------------------------------
The filename is not correctly encoded in case of non-ascii names.
As a work-around you can do the following:
{noformat}
HtmlEmail email = ...
File fileToAttach = ...
EmailAttachment attachment = new EmailAttachment();
attachment.setName(MimeUtility.encodeText(fileToAttach.getName()));
attachment.setDescription("blabla");
attachment.setPath(fileToAttach.getAbsolutePath());
email.attach(attachment);
{noformat}
> Czech/Slovak diacritic marks in the file name of the attached file screw whole sent email
> -----------------------------------------------------------------------------------------
>
> Key: EMAIL-138
> URL: https://issues.apache.org/jira/browse/EMAIL-138
> Project: Commons Email
> Issue Type: Bug
> Affects Versions: 1.3.2
> Environment: Windows 7, JDK 7 (6 compatible).
> Reporter: qed
> Priority: Minor
> Labels: diacritic
>
> Czech/Slovak diacritic marks in the file name of the attached file screw whole sent email. Email will arrive but it's content will be messy. An example of a filename which does this is "nazevřšččššě.txt". Optionally put some text in email and in file. I tried HtmlEmail.
--
This message was sent by Atlassian JIRA
(v6.2#6252)