cancel
Showing results for 
Search instead for 
Did you mean: 

File with an Attachment to Mail with an Attachment

Former Member
0 Kudos

I'm using File adapter and using additional Files option to attach another attachment. I have to send mail out using Mail receiver adapter and should use same attachment name File adapter picked up. I tried several options using MessageTransformBean, PayloadSwapBean etc with no Luck. mail going out to Goole and exchange server as Untitiled.txt . Im using Mail package as Receivers of the mail are dynamic. How can I sent Mail attachment with name dynamically set ?.

Thanks for any help.

Krish.

Edited by: krishvamsi on Oct 15, 2010 1:44 AM

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

MessageTransformationBean lets you change the file name .

Transform.ContentDisposition attachment or inline

For example, attachment;filename=u201Dabc.txtu201D

http://help.sap.com/saphelp_nw70/helpdata/en/57/0b2c4142aef623e10000000a155106/frameset.htm

former_member181985
Active Contributor
0 Kudos

Try this: [Rename Attachment Adapter Module|http://www.sdn.sap.com/irj/scn/weblogs?blog=/pub/wlg/6107] [original link is broken] [original link is broken] [original link is broken];

Former Member
0 Kudos

Hi Praveen,

I already implemented it. I see the atatchment name correctly renamed in SXMB_MONI. But when we sent out mail using Mail receiver attachment name getting changed to untitled.txt

to Recap: Im sending .txt and .csv as attachment. Attachment name gets changed to original Attachment name in SXMB_MONI. However when it sent our using Mail Receiver attachment name getting changed to untitled.txt.

Any Other Ideas please ?.

Thanks

Former Member
0 Kudos

There are several MIME headers that play a role in how the mail client retrieves the file name of an attachment. This behavior differs among various mail clients. Some mail clients use the name parameter in the Content-Type header. While some other use the Content-Disposition or Content-Description value as the file name. To avoid potential interpretation problems, it is recommended to combine the use of these headers. Ideally, your mail header should look something like :

Content-Type: application/text; name="myfile.txt";

Content-Description: myfile.txt

Content-Disposition: attachment; filename="myfile.txt";;

Check whether the mail header generated by PI mail adapter sets all these MIME attributes.

Regards,

TK

Edited by: Sameej T.K. on Oct 21, 2010 1:05 AM