You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Ashwin Karpe <ak...@fusesource.com> on 2010/12/10 13:26:34 UTC

Re: How can I set Content-Transfer-Encoding for attachments

Hi,

The mail component does not inspect every payload to determine the
contentType and encoding. These need to be set in the URI and be in effect
for every request sent/received on an smtp connection.

Please check out the contentType and defaultEncoding properties on the mail
component and set appropriately.

If you need separate treatment for a subset of messages, you will need to
use a different URI with the contentType and encoding set.

Cheers,

Ashwin...

-----
---------------------------------------------------------
Ashwin Karpe
Apache Camel Committer & Sr Principal Consultant
FUSESource (a Progress Software Corporation subsidiary)
http://fusesource.com http://fusesource.com 

Blog: http://opensourceknowledge.blogspot.com
http://opensourceknowledge.blogspot.com 
---------------------------------------------------------
-- 
View this message in context: http://camel.465427.n5.nabble.com/How-can-I-set-Content-Transfer-Encoding-for-attachments-tp3298826p3300225.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How can I set Content-Transfer-Encoding for attachments

Posted by Alfred Hiebl <a....@mic-cust.com>.
Hi Claus,

Thanks. I had the correct content-type. What I did not realize, though, is
that the Content-Transfer-Encoding seems to be determined automatically
based on the actual content. Smart. 

I always tested with a simple message without special characters; which
caused a 7bit encoding. Then by adding special characters to the message,
the base64 transfer encoding was chosen automatically.

Best,
Alfred
-- 
View this message in context: http://camel.465427.n5.nabble.com/How-can-I-set-Content-Transfer-Encoding-for-attachments-tp3298826p3303065.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How can I set Content-Transfer-Encoding for attachments

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

Try using the charset on the content type according to the spec
http://www.w3.org/International/O-HTTP-charset


On Fri, Dec 10, 2010 at 2:45 PM, Alfred Hiebl <a....@mic-cust.com> wrote:
>
> Hi Ashwin,
>
> Thanks for your response. I tried that before, but setting
> "defaultEncoding=base64" in
> the smtp URI does not seem to have any effect. It is still encoded as 7bit
> (-Dmail.debug=true):
>
>
> Content-Type: multipart/mixed;
>        boundary="----=_Part_1_22750429.1291987863341"
> firedTime: Fri Dec 10 14:31:03 CET 2010
>
> ------=_Part_1_22750429.1291987863341
> Content-Type: text/plain
> Content-Transfer-Encoding: 7bit
>
>
> ------=_Part_1_22750429.1291987863341
> Content-Type: application/octet-stream; name=testrg_scenario1
> Content-Transfer-Encoding: 7bit
> Content-Disposition: attachment; filename=testrg_scenario1
>
> Am I using that property incorrectly?
>
> Best regards,
> Alfred
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-can-I-set-Content-Transfer-Encoding-for-attachments-tp3298826p3300298.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Re: How can I set Content-Transfer-Encoding for attachments

Posted by Alfred Hiebl <a....@mic-cust.com>.
Hi Ashwin,

Thanks for your response. I tried that before, but setting
"defaultEncoding=base64" in 
the smtp URI does not seem to have any effect. It is still encoded as 7bit
(-Dmail.debug=true):


Content-Type: multipart/mixed; 
	boundary="----=_Part_1_22750429.1291987863341"
firedTime: Fri Dec 10 14:31:03 CET 2010

------=_Part_1_22750429.1291987863341
Content-Type: text/plain
Content-Transfer-Encoding: 7bit


------=_Part_1_22750429.1291987863341
Content-Type: application/octet-stream; name=testrg_scenario1
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=testrg_scenario1

Am I using that property incorrectly?

Best regards,
Alfred
-- 
View this message in context: http://camel.465427.n5.nabble.com/How-can-I-set-Content-Transfer-Encoding-for-attachments-tp3298826p3300298.html
Sent from the Camel - Users mailing list archive at Nabble.com.