on 02-03-2011 2:30 PM
Hi,
In our scenario, we are not using any message mapping as a specification.A fixed length file is sent from source via proxy as an attachment to the mail.
here the issue is with the file name of the attachment. how do we configure the attachment file name dynamically with out using any message maping.
Regards,
Divya
Hi Divya,
I understand you want to set name for mail attachment.
SAP Note: Mail Adapter sapnote_0000856599
Q: Can I choose the name of an attachment in the mail?
A: Yes. Most mail clients use some heuristics based on some *MIME headers to derive the name of an attachment.* The MIME headers involved in most heuristics are Content-Type, Content-Description,and Content-Disposition. When you create an XI message, the XI payload name is automatically set in the Content-Description. If you want to change or set all of these headers, you can use the MessageTransformBean module (Note 793922) [Link|http://help.sap.com/saphelp_nwpi711/helpdata/en/57/0b2c4142aef623e10000000a155106/frameset.htm]
in the adapter framework.
Q: How can I set the file name of a mail attachment?
There are several MIME headers that play a role in how the client retrieves the file name of an attachment. Unfortunately, this behavior differs among various mail clients. The reason for this inconsistent behavior comes from the fact that this mechanism has been extended incrementally. The old way is to use the name parameter in the Content-Type header as specified in RFC1341. For example, you can set the content type of an XML attachment as:
Content-Type: application/xml; name="abc.xml"
RFC1521 discourages the use of this name parameter in anticipation of the new header Content-Disposition, which is defined in RFC1806.
With this Content-Disposition header, you can set the file name as:
Content-Disposition: attachment; filename="abc.xml"
Some clients may show the Content-Description value as the file name. The Content-Description header is typically used to associate some descriptive information to an attachment (RFC1341) as in
Content-Description: my xml file
To avoid potential interpretation problems, it is recommended to combine the use of these headers.
Regards,
Raghu_Vamsee
Edited by: Raghu Vamsee on Feb 3, 2011 12:23 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Divya,
as mentioned before:
Francesco's blog "Rename Attachment Adapter Module" - /people/francesco.bersani/blog/2007/03/27/rename-attachment-adapter-module descibes a solution.
Regards,
Udo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.