email attachment doesn't have name after receive email.

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

email attachment doesn't have name after receive email.

kkcmpathi
This post has NOT been accepted by the mailing list yet.
Hi All,

I try to send email with attachment using mule vm.
email content and attachment have received properly but attachment name(I put name "test") doesn't exist(attachment have random name instead of test.pdf ,etc: -4.pdf ,-60.pdf ,101.pdf like that).

Can any one help me to solve this problem?

relevant source :


ByteArrayDataSource bads = new ByteArrayDataSource(emailAtt.getFileData(), "application/pdf");
DataHandler dh = new DataHandler(bads);
MuleMessage mm = new DefaultMuleMessage(emailBean.getContent(), emailProperties, muleContext);
                       
mm.addOutboundAttachment("test", dh);
                                               
muleClient.dispatch(emailInBoundEndPoint, mm);