commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clive Haworth <>
Subject Re: [email] header clarification
Date Thu, 24 Jun 2010 12:30:33 GMT

Thanks for the pointer.

I grabbed the source to and had a look. It seems that 
the "standard" headers are US-ASCII encoded automatically when you use 
the specific setter. For example setRecipient(), setReplyTo() etc.. 
However if you use the generic setHeader() you have to do this yourself. 
The other thing is that none of the methods do the automatic folding for 
long lines.

Too complicated by half, if you ask me. This level of detail should be 
handled by javax.mail and applications should not have to worry about 
it. Worse is the javax.mail documentation: use the source Luke, as they say.

On 23/06/2010 14:22, James Carman wrote:
> Commons Email is a "wrapper" around the JavaMail API.  I would imagine
> that the JavaMail provider(s) would be responsible for this.
> On Wed, Jun 23, 2010 at 9:19 AM, Clive Haworth
> <>  wrote:
>> I need some clarification on what is and isn't done to mail headers by
>> commons email, both setting and getting.
>> RFC 822 forces all email headers to use characters in the US-ASCII range 1
>> through 127. Headers not natively in US-ASCII need to be encoded using RFC
>> 2047.
>> Additionally RFC 822 forces header lines longer than 998 characters to be
>> folded.
>> Does commons email handle all this automatically in ALL cases, some cases
>> (and if so which) or not at all?
>> Regards,
>> Clive Haworth
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> For additional commands, e-mail:

View raw message