Mail adapter with attachment

hello
I have a mail sender adapter with attachment, that I would like to transfer to other PI.
the important is to keep the attachment and to deliever it to the PI
any ideas?
Kfir

Hi,
By using Java mapping, you can easily achieve this.
Or use Adapter module 'PayloadSwapBean '.
Please see the below blogs, it might be helpful to you.
/people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
/people/stefan.grube/blog/2007/04/17/xi-mail-adapter-an-approach-for-sending-emails-with-attachment-with-help-of-java-mapping
Regards,
Rajesh

Similar Messages

  • Xi sender mail adapter with attachment (to Web Service w/ attachment)

    Hello,
    We're working on an XI scenario wherein a sender mail adapter polls an exchange server inbox for mail (with attachment)and sends the attachment to a Web Service via SOAP Adapter? Does anyone know if this is doable, and if so, how?
    Thanks,
    Eric

    Hi!
    I think so, if you just have a single attachment to be transferred.
    Use the Mail Sender Adapter and specify the MailServer URL etc...
    In the Module provessor of the Mail-Adapter you have to specify the PayloadSwapBean ( -> this changes the payload - the attachment becomes the payload)
    then you configure the standard XI-scenario with
    SenderAgreement
    Mapping if necessary
    Receiver Agreement
    Receiver adapter
    kr Martin

  • Receiver Mail Adapter with Attachment and Mailpackage

    I have set up a scenario
    filesystem: filexxx.xml filexxx.pdf
    xml= mailpackage format to get the receiver mailaddress
    pdf=the file i want to send as a attchment.
    I am using the RenemAttachment module i found on SDN.
    in SXMB_MONI it looks ok,  the attachment name is filexxx.pdf application/pdf
    But when i look at the mail send it shows as attachments
    Untitled.txt and Untitled.pdf
    Any id's
    I only want to send the mail woth one attachment, the original pdf as a attchment.
    tnx

    Issue should be solved with SP17.
    I solved by putting the attacgement into the content part of the message.
    like.
    <?xml version="1.0" encoding="ISO8859-1"?>
    <ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">
         <Subject>Greenery:TESTTEST</Subject>
         <From>customerservicedesk@xxxxxxx</From>
         <To>Peter.schults@xx</To>
         <Content_Type>application/pdf; name=TEST.pdf</Content_Type>
         <Content_Description>PDF FAKTUUR</Content_Description>
         <Content_Disposition>attachment; filename=TEST.pdf</Content_Disposition>
        </ns1:Mail>

  • Configuring Receiver mail adapter with dynamic email addresses

    Hi,
    I'm a newbie to XI and I have problems in configuring the Receiver mail adapter with the "Use Mail package" option selected. I am trying pickup a file (using file adapter on Sender side, picks up a simple XML file) and after mapping in XI, send the message as an email message to dynamic email addresses.
    Everything works fine if I did not select the "Use Mail Package". But when I choose that option it errors out. I followed this blog posted on SDN -
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    The following XML message is my source
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/Somenamespace">
       <ns0:Message1>
          <ns1:studentlisttest xmlns:ns1="urn:karthiksender_to_karthikreceiver">
             <Student>
                <studentid>1</studentid>
                <lastname>Studentlastname</lastname>
                <firstname>Studentfirstname</firstname>
             </Student>
             <Mail>
                <From>[email protected]</From>
                <To>[email protected]</To>
                <Subject>Test mail adapter</Subject>
             </Mail>
          </ns1:studentlisttest>
       </ns0:Message1>
    </ns0:Messages>
    What I want to accomplish is, I have a simple message mapping where the Studentdetails are mapped to, lets say Customer details. For convenience lets keep it simple, StudentId --> Customerid, (student)Firstname --> (customer)Firstname, (Student)Lastname --> (customer)Lastname
    I would like to get the Customer details as an XML attachment or in the body of an email with from, to and subject corresponding to that specified in the <Mail> node.
    I followed the instructions posted on the blog and it works fine if I don't map the studentdetails to customerdetails. I did multimapping, with one source message (the xml file I posted above) and two target messages (customerdetails and Mail, which is the external definition posted on the blog). I beleive I'm missing something here. Could somebody please guide me through this?
    Thanks
    Karthik

    hi,
    I still have not found the solution for this problem. Michal, your blog works fine when my source message has got only the mail details. As per your advice, I tried modified the structure of the xsd file as follows
    <xs:schema targetNamespace="http://sap.com/xi/XI/Mail/30"
      xmlns:xi="http://sap.com/xi/XI/Mail/30"
      xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <!--
    Mail
      -->
      <xs:element name="Mail">
        <xs:annotation>
          <xs:documentation>Mail package for XI - Mail Adapter</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Subject" type="xs:string" minOccurs="0"/>
            <xs:element name="From" type="xs:string" minOccurs="0"/>
            <xs:element name="To" type="xs:string" minOccurs="0"/>
            <xs:element name="Reply_To" type="xs:string" minOccurs="0"/>
            <xs:element name="Content_Type" type="xs:string" minOccurs="0"/>
            <xs:element name="Date" type="xs:dateTime" minOccurs="0"/>
            <xs:element name="Message_ID" type="xs:string" minOccurs="0"/>
            <xs:element name="X_Mailer" type="xs:string" minOccurs="0"/>
            <xs:element name="Content" minOccurs="0">
              <xs:annotation>
                <xs:documentation>any type</xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
          <xs:attribute name="encoding" type="xs:string"/>
        </xs:complexType>
      </xs:element>
      <xs:element name="MailReceipt">
        <xs:annotation>
          <xs:documentation>Mail Receipt for XI - Mail Adaper</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Server" type="xs:string"/>
            <xs:element name="Format" type="xs:string"/>
            <xs:element name="UseMailPackage" type="xs:boolean"/>
            <xs:element name="Encoding" type="xs:string"/>
            <xs:element name="Subject" type="xs:string" minOccurs="0"/>
            <xs:element name="From" type="xs:dateTime" minOccurs="0"/>
            <xs:element name="To" type="xs:string" minOccurs="0"/>
            <xs:element name="Date" type="xs:dateTime" minOccurs="0"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="CustomerlistExternal">
        <xs:annotation>
          <xs:documentation>Customer List</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Customername" type="xs:string"/>
            <xs:element name="Customerid" type="xs:string"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:schema>
    My source message will be something like
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
       <ns0:Message1>
          <ns1:studentlisttest xmlns:ns1="urn:karthiksender_to_karthikreceiver">
             <Student>
                <studentid>1</studentid>
                <lastname>abclname</lastname>
                <firstname>abcfname</firstname>
             </Student>
             <Mail>
                <From>[email protected]</From>
                <To>[email protected]</To>
                <Subject>Testing Mail adapter</Subject>
             </Mail>
          </ns1:studentlisttest>
       </ns0:Message1>
    </ns0:Messages>
    I have mapped the <student></student> information to customerlist, with customerid --> studentid and customername --> firstname or lastname (for symplicity). This was a multimapping with one source and two target messages. My test mapping output is
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:Messages xmlns:ns0="http://sap.com/xi/XI/SplitAndMerge">
         <ns0:Message1>
              <ns2:Mail xmlns:ns2="http://sap.com/xi/XI/Mail/30">
                   <Subject>Testing Mail adapter</Subject>
                   <From>[email protected]</From>
                   <To>[email protected]</To>
              </ns2:Mail>
         </ns0:Message1>
         <ns0:Message2>
              <ns2:CustomerlistExternal xmlns:ns2="http://sap.com/xi/XI/Mail/30">
                   <Customername>abclname</Customername>
                   <Customerid>1</Customerid>
              </ns2:CustomerlistExternal>
         </ns0:Message2>
    </ns0:Messages>
    So how would I get this part of the <CustomerlistExternal></CustomerlistExternal> part of the message as an attachment to the mail address specified in the <ns2:Mail></ns2:Mail> tags.
    I'm definitely not understanding it right and am missing something. Could you give me step by step instructions to acheive this. I apologize for the trouble..this would be of great help to me.
    Thanks
    Karthik

  • File-xi- mail scenario with attachements

    Hi
    Can anybody tell me the real time use of file-xi- mail scenario with attachements ??
    thanks
    kumar

    Hi,
    >>>>Can anybody tell me the real time use of file-xi- mail scenario with attachements ??
    yes: your application puts order data into a file and generated a PDF file with it
    XI takes both and send order file in mail and PDF in mail attachment
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • 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.

  • File adapter with attachment to mail

    Hi,
    I am working on a scenario where I want to attach a file that is not .txt or .xml along with my file sender adapter . This is, in turn ,received with a mail adapter and I want the attachment to come along with the mail.
    My question is, Is the attachment always in xml format, or can I receive it just as the it is.
    cheers,
    Prashanth

    Hi,
    About SOAP Adapters-
    Develop a Java Application, which reads SOAP Header/Attachments and Sends it as a Mail with attachment using JAVA Mail API. This application should be exposed as a WebService. And invoke this WebService from XI thru SOAP Receiever Adapter.
    Is your idea is sending file as attachment from Sender File Adapter, you need to get the attached file as an attchment in the Mail right ? If so you can try as I said.
    May be useful,
    Regards,
    Moorthy

  • Receiver Mail adapter with txt attachment

    I'm having a requirement to transfer Text fiels as-is to email as an attachment.
    With the study as of now I came to know that if I use mail adapter I can get my payload as XML attachment.
    Can we get text file as attachment instead of XML file in E-Mail?

    hi das
    check the below blogs
    eMail Report as Attachment (Excel/Word)
    eMail Report as Attachment (Excel/Word)
    XI Mail Adapter: An approach for sending emails with attachment with help of Java mapping
    XI Mail Adapter: An approach for sending emails with attachment with help of Java mapping
    regards
    kummari

  • Sender Mail Adapter with PayloadSwapBean

    Hello Experts!
    I have a Sender Mail Adapter receiving emails with attachments! I'm using PayloadSwapBean, because I have to manipulate (to do mapping) the XML attachment.
    Sender Mail Adapter Configuration:
    Default Interface Namespace = urn:mynamespace.com
    Default Interface Name = abs_async_myInterface
    swap.keyName = Content-Disposition
    swap.keyName = Content-Description
    swap.keyValue = attachment;filename="MailAttachment-1.xml"
    swap.keyValue = MailAttachment-1
    Well, my problems are:
    1) Although my Default Interface Namespace is urn:mynamespace.com, sometimes the namespace that cames to SXMB_MONI is http://sap.com/xi/XI/System/Mail. In that case, an Receiver Determination error happens.
    2) My XML can be the first (MailAttachment-1), the second (MailAttachment-2), the third (MailAttachment-3), or any other attachment position. Since my swap.keyValue is set to "MailAttachment-1", I'm able to pick the XML only if it is the first attachment.

    Hi Julio,
    Writing an Adapter Module for the same can make your task easy.
    Thanks'
    Sunil Singh

  • Mail Adapter: original Attachment filename retrieval in Proxy

    Hi,
    I have a Sender Mail Adapter, and the receiver is a proxy, where I need to get the attachment and its details.
    When I execute
    attachment_filename = l_attachment->GET_DOCUMENT_NAME( ).
    it simply returns Attachment-1 etc.
    How do I get the original attachment filename?
    I am on SP16.  
    Regards,
    Puloma.

    HI
    Please refer tihs thread for mail attchments
    Re: Handling attachments of mail
    Scenario to pick the mail with its attachments into XI\Re: Infrastructure required for Mail Adapter

  • Sender Mail Adapter with SAP Conversion agent

    have some1 used SAP conversion agent on attchment from XI Sender Mail adapter?
    it seems to ignore the attchment of the e-mail
    the sender configuration module tab is as follows :
    1.localejbs/AF_Modules/PayloadSwapBean transform
    2.localejbs/sap.com/com.sap.nw.cm.xi/CMTransformBean CM
    3.sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean mail
    The paramters are
    transform swap.keyName Content-Disposition
    transform swap.keyName Content-Description
    transform swap.keyValue attachment
    transform swap.keyValue codeco
    CM TransformationName ZIM_CODECO_VALIDATIONS
    The Convesion Agnet runs prefectly when using the Conversion Agent engine
    thx,Shai Rosenzweig

    check with tis may helpful for you
    http://help.sap.com/saphelp_nw04/helpdata/en/43/4c38c4cf105f85e10000000a1553f6/frameset.htm
    Regds
    Abhishek

  • Mail Adapter with payload

    Hi all,
    I want to set up the following scenario:
    An IDoc is sent to XI. One of the 2 receivers is a SAP system. The other receiver is the mail adapter. We want to send the IDoc (complete incomming xml payload) to a mail receiver.
    This works if I use the message protocol XIALL in the file adapter configuration. But I would also like to change the subject field dynamically based on the payload.
    So I tried to use the mail package with protocol XIPAYLOAD. The result is that I could create the subject field but the mail didn't contain the original payload (res. the IDoc xml) as an attachment. If I activate the "keep attachments" option then the field "contend" is passed as an attachment.
    My question: How can I pass the incomming payload to the receiving mail system by using the mail package (in the content field or as attachment)? Or is there any other possibility to change the subject field when I use the XIALL protocol?
    /Michael

    Hi Peter,
    try:
    <Content_Type>text/plain;name="file.csv"</Content_Type>
    <Content_Disposition>attachment;filename="file.csv"</Content_Disposition>
    <Content>Sample Text</Content>
    Regards
    Stefan

  • Receiver Mail Adapter - Avoid attachment

    Hello
    Could anyone please let me know, how to prevent a mail attachment with a Receiver Mail Adapter. I have chosen XIPAYLOAD as Message Protocol. When the mail is received there is no mail body, instead only the attachment contains the message.
    Thanks
    John Jeyaraj

    Hi,
    Use Mail XSD as target structure in your mapping and enable use Mail package in your receiver channel...
    for avoiding attachments..
    HTH
    Rajesh

  • Mail package with attachment

    Hi,
    I have to send a flat file as attachment through the mail adapter in combination with the mail package because I have to communicate with several partners and I want to determine dynamically the "To:" depending on a field in the source structure (an IDoc).
    The scenario is almost complete. I've created the file as mail attachment using the MessageTransformBean module and it works fine but how can I map the xml structure needed for the mail package?
    I've already check the following weblogs but I didn't find the answer to my question.
    /people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
    /people/srinivas.reddy/blog/2005/02/11/model-driven-architecturemda-for-dummies
    Thank you!
    Ciao
    Stefano

    Hi Stefano,
    Refer to the How-to Guide on Mail Adapter at the below link.
    https://websmp103.sap-ag.de/~form/sapnet?_SHORTKEY=01200252310000071155&_SCENARIO=01100035870000000202&_OBJECT=011000358700004556712005E
    Rgds,
    Sam Raju

  • Mail Adapter ContentDisposition attachment

    Hello,
    We have goot a big Problem with the Mail-Adapter at PI.
    The Adapter generated:
    MIME-Version: 1.0
    Content-ID: <mail-9674f6c0d03711de86dc00144fb7b1f0>
    Content-Disposition: inline
    Content-Type: multipart/mixed; boundary="AaBb--984dfgeSSd3532"
    Content-Transfer-Encoding: binary
    Message-ID: <MA-EX051w920foGAl6g0001065b@xxxccc>
    X-OriginalArrivalTime: 13 Nov 2009 09:33:23.0294 (UTC) FILETIME=[58264FE0:01CA6444]
    But we need:
    MIME-Version: 1.0
    Content-ID: <mail-9674f6c0d03711de86dc00144fb7b1f0>
    Content-Disposition: inline
    Content-Type: multipart/mixed; boundary="AaBb--984dfgeSSd3532"
    Content-Transfer-Encoding: attachment
    Message-ID: <MA-EX051w920foGAl6g0001065b@cccxxx>
    X-OriginalArrivalTime: 13 Nov 2009 09:33:23.0294 (UTC) FILETIME=[58264FE0:01CA6444]
    We use as Bean: localejbs/sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean
    Transform.ContentDisposition attachment
    Could someomene help us.
    Thanks and bye bye
    Marc

    Hi Marc,
    Didnt get your requirement correctly!!!
    You want the payload as an attachment to mail?? If yes the in receiver mail adapter select keep attachments and choose XIPayload
    Regards
    Suraj

Maybe you are looking for