cancel
Showing results for 
Search instead for 
Did you mean: 

Get filename of an e-mail attachment from the sender

Former Member
0 Kudos

Hi,

I have a question regarding attachments in a sender mail adapter. I have to detach the attachment and save it on the local file system. That's not the problem, I'm able to swap the payload and save on the filesystem.

The problem is to get the orginal file name of the attachment. I see in the message monitor it is stored in the content-type, eg:

content-type:application/octet-stream;name="filename.csv"

How do I get the "filename.csv", to be able to save the csv file under that name on the file sytem.

Thanks for answering.

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi Patrick

Did you check the following thread,

cheers

Sameer

MichalKrawczyk
Active Contributor
0 Kudos

hI Partick,

have you tried using getContentType() method

one the attachment in the adapter module?

that doesn't work ?

Regards,

michal

-


<a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>

Former Member
0 Kudos

Micheal,

No I didn't try it yet, because I didn't know about(bit new on the mail adapter) and where/how to use it.

MichalKrawczyk
Active Contributor
0 Kudos

hi,

have a look then

BTW

just create a simple adapter module and try it - I believe it should work

Regards,

michal

stefan_grube
Active Contributor
0 Kudos

> have you tried using getContentType() method

> one the attachment in the adapter module?

>

> that doesn't work ?

Hi Michal,

This will work only starting from XI3.0 SP20.

In lower SP levels, the getContentType() method will return only: application/octet-stream

Regards

Stefan

bhavesh_kantilal
Active Contributor
0 Kudos

Stefan,

SP 20? Is Sp 20 out already? or did you mean SP 19?

Regards

Bhavesh

stefan_grube
Active Contributor
0 Kudos

No I mean SP20.

It is planned for April.

The corresponding PI 7.0 SP 12 is planned for May.

Regards

Stefan

bhavesh_kantilal
Active Contributor
0 Kudos

Stefan,

Dont Mind my questions, but , wouldnt it be PI 's SP 11? Considering that we are now on SP 10 for PI , next release has to be SP 11 right?

Apologies if i am missing something.

Regards

Bhavesh

stefan_grube
Active Contributor
0 Kudos

Yes, for PI the next SP is 11, but SP 12 corresponds with XI SP 20 and SP 14 corresponds to XI SP 21. SP 11 and SP 13 are intermediate SPs.

Don't ask me why.

Here the schedule:

https://service.sap.com/~sapdownload/011000358700000294692004E/Stack_Planning.htm

Regards

Stefan

bhavesh_kantilal
Active Contributor
0 Kudos

Am not gonna ask why, but will sure thank you for the info.!

Thanks.

Regards

Bhavesh