Hi,
i try to send a zip file as an attachment in a mail, but it finished in the
message body, see below.
In a bean i attach the zip file to the message with this code :
exchange.getIn().addAttachment(filename,new DataHandler(new
FileDataSource(pathname)));
and then i try to set the content type for the mail endpoint with a
ContentTypeResolve :
MailEndpoint sendMail = (MailEndpoint) exchange.getContext()
.getEndpoint(ReceiveRoute.sendMail);
sendMail.setContentTypeResolver(new AttachmentContentType(
"multipart/form-data"));
Nothing to do, the zip file is still in body message.
Some body has an idea what's wrong?
Thanks
kh
------=_Part_0_1225759642.1390484383704
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Sasa, received file orarioSASA_20131215.zip
------=_Part_0_1225759642.1390484383704
Content-Type: text/plain; name=orarioSASA_20131215.zip
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename=orarioSASA_20131215.zip
UEsDBBQAAAAIAER5hUOtuR1tW2QJAJkGLwAbAAAAb3JhcmlQYXNzYWdnaW9fMjAxMzEyMTUuY3N2
dJ1JkiO6rmTnZfb3wr55d//7qowQ4SAOFZMc0FMKORsQRJv/myn913Pu/+X/8vpfn/9L6f/+X7bh
8V/5HV5xeP5Xvw2v/9rv8I7D+79/3/4zFobT/m/8Dud7OJX63/wdLvdw7fm/9Ttc4/8e/+1vw//+
b/odb/Fv/vt9+Xe8x/F/LMvv+Ijj//5z/R0P85L2vz/afsdXHP/30/u38X+DH7I7jv/78l+2OcXx
fz/+l27+TE4Jy9T+V2cc/l2mf8MrDv8u0zv8u0z/hncc/l2m9r+WwvBnmf4Nh19ylunfcLmHzzL9
G67xf/8u0zv8WaZ/4y3+zc8y/RvvcfyzTP/GRxz/LNO/8TAvtkz/xlcc/yzTO/5Zpn/jO45/lqn9
r6c4/lmmf+Ofyan/DY3/Y2b/XcP5Z5ne4fKzTOn5kvazTO/w+Fmmf8MlDq+fZfo3XO/h/O+f+Tvc
-----
kh
--
View this message in context:
http://camel.465427.n5.nabble.com/Mail-attachment-zip-files-goes-to-message-body-tp5746400.html
Sent from the Camel - Users mailing list archive at Nabble.com.