Skip to Content
author's profile photo Former Member
Former Member

How to get filename from mail attachment

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Posted on Oct 19, 2006 at 06:26 PM

    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.

    Add a comment
    10|10000 characters needed characters exceeded

    • Former Member

      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

  • Posted on Oct 19, 2006 at 06:39 PM

    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-

    Email attachment file names

    PayloadSwapBean-

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

    Regards,

    Moorthy

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.