commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Siegfried Goeschl (JIRA)" <j...@apache.org>
Subject [jira] Updated: (EMAIL-98) Encoding and folding of headers should not be left to the user
Date Thu, 29 Jul 2010 21:05:18 GMT

     [ https://issues.apache.org/jira/browse/EMAIL-98?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Siegfried Goeschl updated EMAIL-98:
-----------------------------------

    Fix Version/s: 1.3

> Encoding and folding of headers should not be left to the user
> --------------------------------------------------------------
>
>                 Key: EMAIL-98
>                 URL: https://issues.apache.org/jira/browse/EMAIL-98
>             Project: Commons Email
>          Issue Type: Improvement
>    Affects Versions: 1.2
>            Reporter: Mario D├Ąpp
>            Assignee: Siegfried Goeschl
>            Priority: Minor
>             Fix For: 1.3
>
>
> Currently, folding and encoding of e-mail headers is completely left to the user. As
commons-email is aimed at simplification of the Java Mail API, the encoding and folding issues
should be taken care of by commons-email.
> The method buildMimeMessage() in Email.java should be changed as follows:
> if (this.headers.size() > 0)
> {
>     Iterator iterHeaderKeys = this.headers.keySet().iterator();
>     while (iterHeaderKeys.hasNext())
>     {
>         String name = (String) iterHeaderKeys.next();
>         String value = (String) headers.get(name);
>         this.message.addHeader(name, MimeUtility.fold(name.length() + 2, MimeUtility.encodeText(value,
this.charset, null)));
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message