How to access attachement in mail adapter

Hello,
i receive mails with an xml file attached with the mail adapter. Within the integration engine i can see that the adapter creates a message with two parts in the payload "MailAttachement-1" and "MailMessage". When i configure a file writer for my message i only get the content of the "MailMessgage" part (which contains only the sender, subject, mailtext ... and not the data i need (= "MailAttachement-1")). I tried several settings within the mail adapter configuration (user Mail Package, keep Attachements) -> no success.
How can i get access to the "MailAttachement-1" within the mapping?
Thanks
Peter

Hi,
If you want only the header data of the file (expecting you are having other data also) then it is not possible to do so without mapping. What I would suggest is to do the mapping for header and use this in ID.
So configure two receivers one for mail and another with file. In the receiver determination for the mail you use mapping and for file you dont use mapping at all. This would resolve your issue.
Regards,
---Satish

Similar Messages

  • How to Send Appointment via mail adapter

    Hi Guys,
         I need to send the appointment and vTodo via mail adapter, any way i need to develop a mail adapter module. Till now i have finished this part,and i can send normal mail even normal mail with attachment. But i don't know how to send appointment via mail adapter.
    This is payload content of appointment which got from Exchange server to gmail:
    _=_NextPart_001_01C71EC0.97A011C6
    Content-Type: text/plain;
        charset="GB2312"
    Content-Transfer-Encoding: quoted-printable
    When: 2007=C4=EA6=D4=C227=C8=D5=D0=C7=C6=DA=C8=FD 3:30 =CF=C2=CE=E7-4:00 = =CF=C2=CE=E7 (GMT+05:30) Chennai, Kolkata, Mumbai, New Delhi.
    Where: China
    ~*~*~**
    This is calendar content
    _=_NextPart_001_01C71EC0.97A011C6
    Content-class: urn:content-classes:calendarmessage
    Content-Type: text/calendar;
        method=REQUEST;
        name="meeting.ics"
    Content-Transfer-Encoding: 8bit
    BEGIN:VCALENDAR
    METHOD:REQUEST
    PRODID:Microsoft CDO for Microsoft Exchange
    VERSION:2.0
    BEGIN:VTIMEZONE
    TZID:(GMT+01.00) Sarajevo/Warsaw/Zagreb
    X-MICROSOFT-CDO-TZID:21
    BEGIN:STANDARD
    DTSTART:20070112T140000
    TZOFFSETFROM:+0100
    TZOFFSETTO:+0100
    END:STANDARD
    BEGIN:DAYLIGHT
    DTSTART:20070112T140000
    TZOFFSETFROM:+0100
    TZOFFSETTO:+0200
    END:DAYLIGHT
    END:VTIMEZONE
    BEGIN:VEVENT
    DTSTAMP:20061213T141132Z
    DTSTART;TZID="(GMT+01.00) Sarajevo/Warsaw/Zagreb":20070112T140000
    SUMMARY:This is calendar test
    UID:040000008200E00074C5B7101A82E0080000000030D51864C81EC701000000000000000
    010000000CA9F127EA8947844BC4DD47F269BDEA9
    ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN="Xu, Rocky":MAILTO:rocky@***.com
    ORGANIZER;CN="Xu":MAILTO:rocky@**.com;roc*@gmail.com
    LOCATION:Shanghai
    DTEND;TZID="(GMT+01.00) Sarajevo/Warsaw/Zagreb":20070112T160000
    DESCRIPTION:This is calendar content\N
    SEQUENCE:0
    PRIORITY:5
    CLASS:
    CREATED:20061213T141132Z
    LAST-MODIFIED:20061213T141133Z
    STATUS:CONFIRMED
    TRANSP:OPAQUE
    X-MICROSOFT-CDO-BUSYSTATUS:BUSY
    X-MICROSOFT-CDO-INSTTYPE:0
    X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
    X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
    X-MICROSOFT-CDO-IMPORTANCE:1
    X-MICROSOFT-CDO-OWNERAPPTID:367904726
    X-MICROSOFT-CDO-APPT-SEQUENCE:0
    X-MICROSOFT-CDO-ATTENDEE-CRITICAL-CHANGE:20061213T141132Z
    X-MICROSOFT-CDO-OWNER-CRITICAL-CHANGE:20061213T141132Z
    END:VEVENT
    END:VCALENDAR
    _=_NextPart_001_01C71EC0.97A011C6--
    My question is
      1. How to generate this kind of payload in mail adapter module?
      2. It is possible to send appointment via mail adapter?
    Following i can get from other system, even using mail package check or not using mail package check.
    BEGIN:VCALENDAR
    METHOD:REQUEST
    PRODID:Microsoft CDO for Microsoft Exchange
    VERSION:2.0
    BEGIN:VTIMEZONE
    TZID:(GMT+08.00) Kuala Lumpur/Singapore
    X-MICROSOFT-CDO-TZID:21
    BEGIN:STANDARD
    DTSTART:16010101T000000
    TZOFFSETFROM:+0800
    TZOFFSETTO:+0800
    END:STANDARD
    BEGIN:DAYLIGHT
    DTSTART:16010101T000000
    TZOFFSETFROM:+0800
    TZOFFSETTO:+0800
    END:DAYLIGHT
    END:VTIMEZONE
    BEGIN:VEVENT
    DTSTAMP:20070608T025852Z
    DTSTART;TZID="(GMT+08.00) Kuala Lumpur/Singapore":20070608T110000
    SUMMARY:This is meeting request with attachment
    UID:040000008200E00074C5B7101A82E0080000000000A9BD0BA7A9C701000000000000000
    010000000C5E16D144D1612498C0EF7E2115EFEC4
    ATTENDEE;ROLE=REQ-PARTICIPANT;PARTSTAT=NEEDS-ACTION;RSVP=TRUE;CN="Xu, Rocky
    ":MAILTO:roc*@**
    ORGANIZER;CN="Xu,y":MAILTO:roc*@**
    LOCATION:India labs
    DTEND;TZID="(GMT+08.00) Kuala Lumpur/Singapore":20070608T113000
    DESCRIPTION:This is content!  <<shanghai.txt>> \N
    SEQUENCE:0
    PRIORITY:5
    CLASS:
    CREATED:20070608T025925Z
    LAST-MODIFIED:20070618T033505Z
    STATUS:CONFIRMED
    TRANSP:OPAQUE
    X-MICROSOFT-CDO-BUSYSTATUS:BUSY
    X-MICROSOFT-CDO-INSTTYPE:0
    X-MICROSOFT-CDO-INTENDEDSTATUS:BUSY
    X-MICROSOFT-CDO-ALLDAYEVENT:FALSE
    X-MICROSOFT-CDO-IMPORTANCE:1
    ATTACH:CID:008501c7b159$a9d41d3b$_CDOEX
    X-MICROSOFT-CDO-OWNERAPPTID:1468557271
    X-MICROSOFT-CDO-APPT-SEQUENCE:0
    X-MICROSOFT-CDO-ATTENDEE-CRITICAL-CHANGE:20070608T025852Z
    X-MICROSOFT-CDO-OWNER-CRITICAL-CHANGE:20070608T025852Z
    END:VEVENT
    END:VCALENDAR
    Thanks & regards
    Rocky

    Hi
    have a look at this
    You can use Java/ABAP proxies to do this job for you..
    Java Proxy >> will read the mail(with the attachments) with the help of Java APIs and send the message into XI ABAP Proxy >> for this you will have to first convert the attachment into a message and then you can proceed in the regular fashion.
    Not all adapters can process attachments, I'm not sure why you are having trouble with using module processor in the mail adapter. Just check if the service pack that you are using supports this feature.
    If you are on WAS 6.10 and above you can achieve this and there is an excellent weblog by Thomas Jung on this topic at
    /people/thomas.jung3/blog/2004/09/09/receiving-e-mail-and-processing-it-with-abap--version-610-and-higher
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/6d967fbc-0a01-0010-4fb4-91c6d38c5816
    reading Pdf Through mail easly done with Java Proxy, which will read the mail(with the attachments) with Java APIs and send the message into XI and then map with the Target ABAP proxy structure .
    Thanks

  • File attachement in mail adapter

    Hi ,
    I need to send users an error report which I have captured in the form of a file. Is it possible to attach this file as an attachement via mail adapter. I have been reading that the payload can be sent as attachment by specifying the interface namespace and interface name. But my requirement is to trigger the mail once the file has been completely written and not for every message. The reason being I could have 3000 records in the file and I dont want to send 3000 MAILS out but just 1 mail for the entire 3000 records...
    Thanks,
    Teresa

    Hi Teresa,
    I hope, I understand you right.
    When you use the file-adapter for sending the file, you can without mapping send this file out to a mail receiver as attachment, there is nothing special to do.
    Regards
    Stefan

  • How To Send A Text Attachment Through MAIL Adapter

    Hi Experts,
       I Did A Scenario that is  By using file adapter at the sender side and PI as a middle ware i have sent one text file to database
    Now here my question is
    I have to send the same text file which i have sent database... my using Mail Adapter
    Simply  File to Mail Scenario
    FILE         PI                MAIL
    But I have to send the same text file which i sent to database... by using mail adapter... Here all the configuration are done ... And the channels are working properly... only thing  here is..to send same text file using mail adapter..
    It will be good if  any one can explain step by step..
    Regards
    aravindh

    Hi Rajendra,
       Tanq for connecting me ... This  Blog helped me a lot ....And it is a useful answer to me..
    For this file to mail scenario we have got .txt as an attachment ... Its fine ... But her my Client is asking me to add CONTENT in the mail... Content in the sense..
    Example of content...
    Hi,
    Please find the attachment
    Regards,
    sap pi,
    They need in the form of like this...  To add content in the mail  What i have to do...DO i need to add more configurations if it is what are they...
    Please solve the issue.. It is appreciated  some one can explain me step by step or .. By sending me screen charts..
    Thanks in  advance....
    Regards
    vinay

  • Remove Attachment in Mail Adapter Module

    Hi!
    My problem: I get an email with an attachment which I process in an adapter module for the mail adapter. With the resulting XML I set a new payload, but the old attachment still exists.
    This gets to a problem when I route the message back to the mail adapter, he adds the old attachment to the generated email. Therefore the new email has two attachments: the old one and the new one, which should only be one attachment: only the new one.
    How can I remove the old attachment? I found no function which solves this problem.
    Best regards,
    Daniel

    Hi Michal,
    thanks for the link.
    When I import aii_proxy_xirt.jar in my NWDS, I can import the MessageSpecifier class. But I can't get an instance of it from the classes which I can access.
    The only 'documented' usages of this class I found were codings for java proxies, so I'm not sure we can use this class in an adapter module.
    In this cases they get the MessageSpecifier instance from the proxy bean, so maybe we can get it from the EJB, but this doesn't work with an adapter module (or I haven't found out how )
    Hmm. It is a simple problem, but it seems difficult to solve
    Best regards,
    Daniel
    Message was edited by: Daniel Himmel

  • Plain text and attachment in Mail Adapter (Receiver)

    Hello,
    we have to generate a mail in the mail-adapter with a specific text and an attachment.
    The attachment is a document in pdf-format, that is generated inside an adapter-module out of the payload-document.
    An additional text has to be added to the mail for the receiver in plain-text-format, like "Dear customer ... enclosed you will find ...".
    Is it possible to mix plain-text and attachments in the mail adapter? Does anybody know how we can do that?
    Regards,
    Thorsten

    Hi,
    yes you can do it very easily inside the adapter module
    if you're already using the adapter module then
    you can just enhance it a little bit
    you can add the pdf to the attachment section and
    leave dear customer in the standard payload
    you can even make it a little bit more dynamic
    and create a module that will take the input from
    the communication channel config (modules tab) - for example xml tag name in which you will specify
    the dear customer (or any other text) and after this
    the pdf creating can use the xml without this tag...
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions">XI FAQ - Frequently Asked Questions</a>

  • Unzip attachment in Mail adapter or/ File Adapter

    Hi everyone,
    I need to get flat file from .zip attachment that comes with mail? Is it possible to get it with Mail adapter, unzip it and then make conversion? All steps in the Integration engine?
    Another option can be get .zip with File adapter, but again how to unzip it?
    Thanks,any help appriciated as I am doing my first XI project.
    Nataliya

    >
    Buffy76 wrote:
    > Thanks a lot,  guys. Unzipping is clear now.
    >
    > Prateek, it would be great if you can you point to "how-to" file or example for MessageTransformBean.
    >
    > Regards,
    >
    > Nataliya
    ref this https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/9e6c7911-0d01-0010-1aa3-8e1bb1551f05

  • PDF attachment in mail adapter

    Hi
    I am reading mailbox using mail adapter. But i cannot read the PDF attachment in that mail. I use "PayloadSwapBean" in the module, but it is packing the mailbody to the text file, but they is no sign of PDF attachment. How to read the attachment.
    Regards
    Andy

    Hi Anandan,
    You can use Java/ABAP proxies to do this job for you..
    Java Proxy >> will read the mail(with the attachments) with the help of Java APIs and send the message into XI ABAP Proxy >> for this you will have to first convert the attachment into a message and then you can proceed in the regular fashion.
    Not all adapters can process attachments, I'm not sure why you are having trouble with using module processor in the mail adapter. Just check if the service pack that you are using supports this feature.
    If you are on WAS 6.10 and above you can achieve this and there is an excellent weblog by Thomas Jung on this topic at
    /people/thomas.jung3/blog/2004/09/09/receiving-e-mail-and-processing-it-with-abap--version-610-and-higher

  • Sending File as attachment using Mail adapter with naming convention

    Dear All,
    I am working on a scenario in which my sender file adapter is sending one file named 'ABC.ok' in one of the folders in application server. I have to send the same file with the same name  to one of the folders at FTP and also to my customer at his email id.
    I have used File Content onversion at the receiver side and has selected adapter specific attributes due to which the required file is getting generated at FTP folder with the same name as that of the source. But how to send the same file using the mail adapter by keeping same name as "ABC.ok". Kindly guide me out in this.
    Regards,
    NJ

    what you need to do:
    1) Select ASMA in Sender and receiver File CC...already done
    2) Using the Dynamic Config UDF get the sender file name in the field Content-Type...for this you need to have a return statement in your UDF
    3) now before pushing this file name to the Content-Type you have to append (concat)the actual type of the file content (xml, txt)
    so your entire Content-Type node will have something like text/plain; name="abc.ok"
    SAP Note has reference on how to do this:
    https://service.sap.com/sap/support/notes/856599
    From the note:
    Q: How can I set the file name of a mail attachment?
    Regards,
    Abhishek.

  • Receive CSV attachment via Mail Adapter and process into ABAP proxy

    Hi,
    I have the following scenario:
    1. Receive e-mail with CSV attachment
    2. Process through Mail adapter (KeepAttachments = Yes in order to retain the CSV attachment)
    3. Receive into ABAP proxy (with CSV attachment)
    The next step is to read the attachment in the ABAP proxy and process the CSV attachment data into CRM.
    The CSV attachment contains the data I wish to process - the body of the e-mail will not contain this information.
    The problem I have is reading the attachment data in the proxy - not sure of the methods/class to call - anyone got any ideas ?
    Another question is this the best way to do this and process the CSV attachment data ?
    I know I could use the PayloadSwapBean to switch the payload to the attachment but then I am stumped with how the attachment is processed through PI 7.1 - how do you transform the CSV format payload into XML so PI will be able to process it through mapping.
    Either option is viable - an answer to either question would be great.
    1. How do you read the attachment data in an inbound ABAP proxy ?
    2. How do you transform the CSV attachment data after the PayloadSwapBean from CSV to XML ?
    Kind regards
    Colin.

    Hi Colin
    As you are not interested in processing the body of email. Swap the payload to the attachment using the PayloadSwapBean
    Change the content from CSV to XML using MessageTransformBean. Now pass this information to Proxy. You dont need to deal with attachments in proxy.
    It is not possible to read attachment in server proxy because the class and interface you create will not have data type which can refer to an attachment processing interface in ABAP.
    Thanks
    Gaurav

  • Sending a File (XML or TXT) as attachment to Mail Adapter

    Dear all,
    In a scenario I'd like to pull a file by using  'File Adapter' and send it (without content change) as attachment to an Email recipient.
    Is their any possibility to send a file by using Mail Adapter?
    Do you have any similar solution in place, if so could you please share your experiences with me?
    FYI, we are using XI 3.0, SP14.
    I'll appreciate your time.
    Regards,
    K. Afsali

    Hi Afsali,
    //Is their any possibility to send a file by using Mail Adapter
    it is possible.
    There are a few steps to it though. You will have to convert the file you pick up into an XML file as XI can process only XML data.
    After you are done with it, you will have to import a WSDL for sending mails. this WSDL is available on SAP Marketplace and it will have all details like from, to subject,and content. To get this WSDL just check this link,
    https://websmp205.sap-ag.de/~sapidb/012006153200000361852004E/ximail30_xsd.txt
    Just do the mapping of the respective fields and the information mapped to the content field will be passed as the content of the mail.
    Just check thise links out,it will surely help you
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    Regards,
    Bhavesh
    Message was edited by: Bhavesh Kantilal

  • How to access Payload in XI Adapter Module

    Hello,
    I have to enhance a adapter module in xi very urgently. Target is to access a node of the XML payload and retrieve the corresponding value.
    This is how my document looks like:
    <mt_test>
         <element1>
              <…> </…>
         </element1>
         <element2>
              <LOG_NO>4711 </LOG_NO>
         <element2>
    </mt_test>
    I need now access the element <LOG_NO>. This can only appear one time in the whole xml document. My code that I did so far (inside the process method) to retrieve this element is like this:
    XMLPayload xmlpayload = msg.getDocument();
         DocumentBuilderFactory factory = null;     
         factory = DocumentBuilderFactory.newInstance();
         DocumentBuilder builder = factory.newDocumentBuilder();
         Document document = builder.parse ((InputStream)xmlpayload.getInputStream());
         Element rootNode = document.getDocumentElement();
    <…and now I have no clue anymore…:-/…>
    May you give me an example how to access the node <LOG_NO> and save the corresponding value in a String variable?
    I would be really thankful.
    Greetings and thanks in advance,
    Tobias

    Hi,
    >>>found no solution with PI Standard Import to support FTP inside the Adapter Module
    why would you? file adapter supports FTP - so you don't need it
    >>>In order to use FTP library, is there any standard library available or supported by SUN.
    you can use any java ftp client available on google
    Regards,
    Michal Krawczyk

  • Can XI Message be mapped to a flat file attachment in Mail adapter

    Hi guys,
    I have a requirement, where I have ECC system seding a XI message to XI.
    Now XI has to convert this to a flat file may be tab delimited and send this as an attachment in email using receiver mail adapter.
    I want to avoid BPM and make it simple.
    Appreciate any help on this topic.
    Regards
    Sujan

    Hi,
    Here are some mapping examples.
    /people/rahul.nawale2/blog/2006/07/18/java-mapping-an-alternate-way-of-reading-a-csv-file
    /people/alessandro.guarneri/blog/2007/03/25/xi-java-mapping-helper-dom
    /people/carlosivan.prietorubio/blog/2007/12/21/implementing-a-java-mapping-in-sap-pi
    /people/venkataramanan.parameswaran/blog/2006/12/12/java-mapping-to-handle-flat-files-in-sap-xi
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-iii
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii
    /people/prasad.ulagappan2/blog/2005/06/29/java-mapping-part-ii
    /people/michal.krawczyk2/blog/2005/02/25/simple-java-code-in-graphical-mapping--xi
    Vishal

  • Text Attachment in Mail Adapter

    Hi, I have Proxy-XI-Mail scenario.
    I want to send the mail as TEXT attachment.But the Text is coming as Mail content.
    I have having following config
    Processing Sequence
    localejbs/CreateAttachment                           Local Enterprise Bean     XML2Plain
    localejbs/sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean  Local Enterprise Bean mail
    Module Configuration
    XML2Plain     Transform.Class     com.sap.aii.messaging.adapter.Conversion     
    XML2Plain     Transform.ContentType     text/plain;charset=utf-8          
    XML2Plain     xml.Header1000.fieldFixedLengths     100,10,10,30,30,80,80,20,10,10,20,20,30,10,18,240,10,30,18,10
    XML2Plain     xml.Header2000.fieldFixedLengths     100,30,40,240
    XML2Plain     xml.addHeaderLine     0
    XML2Plain     xml.conversionType     StructXML2Plain
    XML2Plain     xml.recordsetStructure     Header1000,Header2000
    Please suggest some solution.
    Thanks.
    Rushikesh

    Hi,
    Refer these blogs
    http://www.sapag.co.in/SAP-XI-Mail-Adaptor-FAQ'S.html
    The specified item was not found.
    The specified item was not found.
    eMail Report as Attachment (Excel/Word)
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1685 [original link is broken] [original link is broken] [original link is broken]
    XI Mail Adapter: An approach for sending emails with attachment with help of Java mapping
    and also refer these links
    http://www.riyaz.net/blog/index.php/2008/02/27/xipi-configuring-the-sender-mail-adapter/
    http://help.sap.com/saphelp_nw04/helpdata/en/23/c093409c663228e10000000a1550b0/content.htm
    Regards,
    Suryanarayana

  • How to access my apple mail account with a pc

    I'm on the road w/o my apple computer. I have access to a windows pc but don't know how to access my @me.com mail account

    You can access it by signing into your iCloud account on icloud.com.  You can also add your iCloud email account to the mail client on your PC using these settings: http://support.apple.com/kb/HT4864.

Maybe you are looking for

  • Use of Checkbox in Report for calculation and determine checked records

    Dear All, Application Express 4.0.1.00.03 I have a Report based on Invoice table which displays unpaid Invoices. Also I have added one check box (Not a column in Invoice field) to each row of the report query, the user will be check to pay the Invoic

  • Help me to debug this function.

    public Frame getParentFrame() Container container = null; for(container = getParent();!(container instanceof Frame); ){ container = container.getParent();/*/ return (Frame)container; When I use this function , it will wrong at the line marked "*"(I p

  • Issue while using Collect statement in program

    Hi friend's, i have some issue regarding Collect statement.. Issue is somthing like this,i have created a structure and internal table and work area with same type, u can look in below code..i wann to collect 'enmng' f'ield value whose matnr,charg,mv

  • How to open .ppt file from email?

    Can i open .ppt file on my iphone? I've got that file on email.

  • Sync issues iphone 3g

    when i try to sync my iphone (first time on new pc, first time in ages), all of the menus seem to be greyed out. Thought if i upgraded to ios 4.2, that might sort it out, but that just says it cant connect to the server. I just want to take some musi