cancel
Showing results for 
Search instead for 
Did you mean: 

How to get filename from mail attachment

Former Member
0 Kudos

Hi all,

I have a XI scenario Mail->XI->RFC. I have created my own adapter module which handle all attachments from incoming mail.

Everything work fine, but in my module I try to get information about filename of mail attachment. I use getContentType() metod to get the filename but this method return only the mimetype of the document. The getDescription() method return olny string "mail attachment". I need to get the original filename of the attachment or at least the file extension.

Is it possible to get the whole filename from mail attachment?

Thanks

Peter

Accepted Solutions (0)

Answers (2)

Answers (2)

moorthy
Active Contributor
0 Kudos

Hi,

You can tryout with adapter modules . You can make use of following Adapter attributes also -

http://help.sap.com/saphelp_nw2004s/helpdata/en/ad/bf93409c663228e10000000a1550b0/content.htm

Similar discussion-

PayloadSwapBean-

/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step

Regards,

Moorthy

henrique_pinto
Active Contributor
0 Kudos

What about getName() ?

From the javadoc:

getName

public java.lang.String getName()

Returns the logical name of this payload. Payloads can be accessed by this name from the Message interface.

Returns:

String name

Regards,

Henrique.

Former Member
0 Kudos

Thanks for your reply,

I have tried the getName() method in my adapter module. But it return only string "Attachment-1" where the number is different for each attachment.

I have tried to find out some solution but I did not find any.

Thanks anyway.

Peter