commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thomas Neidhart (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (EMAIL-138) Czech/Slovak diacritic marks in the file name of the attached file screw whole sent email
Date Tue, 06 May 2014 18:19:20 GMT

    [ 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)

Mime
View raw message