cancel
Showing results for 
Search instead for 
Did you mean: 

Email attachment file names

Former Member
0 Kudos

I have a sender mail adapter that picks up emails with file attachments from a mail box using the IMAP transport protocol.

The mail adapter passes processing onto the PayloadSwapBean and then onto a customised module that processes the file attachment (a CSV file).

When I use the messaging system i.e. http://xiserver:port/MessagingSystem/monitor/monitor.jsp

I can see that Content-Type includes the attachment's file name:-

Content-Type: application/octet-stream;name="INV_5016888091848_20060912_00001.csv"

Content-Disposition: attachment;filename="MailMessage.bin"

Content-Description: MailMessage

In my customised module I would like to pick up this file name so that it can be stored in a database table. I have attempted to pick up this file name from the payload using the "getContentType" method of the "XMLPayload" class but this only returns "application/octet-stream" and does not include the file name.

Does anyone know how I can get hold of the above file name using the Adapter Framework API? Or, alternatively, by some other method/approach.

Any help on this would be greatly appreciated.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

I never used this but an idea.Have a try ..

Please chcek this link -

http://help.sap.com/saphelp_nw04/helpdata/en/8d/a9d240a0a98431e10000000a1550b0/frameset.htm

Please check for Adapter -Specific Message Attributes

->To store adapter attributes in the message header of the XI message, set the Use Adapter-Specific Message Attributes indicator.

The following attributes are added to the XI message header if the sender makes them available, and if you choose Variable Transport Binding.

To transfer further header fields, set the relevant indicator. You can then store the following attributes and their values in the XI message header:

You can set the details in header with the file names you required like this Variable Header-> XHeaderName1

Nanda

Answers (3)

Answers (3)

stefan_grube
Active Contributor
0 Kudos

Apply SP20/12, then it works that way.

Regards

Stefan

Former Member
0 Kudos

Hi Simon

Was wondering if you were able to find a solution to the problem. If so. could you let us know as well.

Regards

Salil

Former Member
0 Kudos

Try the method getName in the XMLPayload class.

Hope it works,

Bhanu