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>

Similar Messages

  • 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

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

  • Receiver Mail adapter with multiple mail ids

    Hi Experts,
    I am doing File to Mail scenario.
    I am generating mail package structure using Java mapping.
    Email is not going to multiple mail ids mentioned in To field.
    I tried with , and ; but for both it is behaving strange:
    When using ,(coma)
    in case of multiple receivers:
    only last mail id will receive mail in Inbox
    when using ;(semicolon)
    Every email id person will receive mail but with same name listed under To: that is last mail id.
    For example:
    To: abc.at.test.com,xyzat.est.com,def.at.est.com
    Then only def.at.test.com will receive mail
    In case of semicolon(;):
    Every mail id will receive mail in Inbox, that is abc.at.test.com,xyz.at.test.com,def.at.test.com
    will get mail in their respective mail box, but all mails will have same TO field: def.at.test.com
    I hope it is cleared.
    If you want I can send outlook mail headers from outlook.
    Best Regards,
    Divyesh

    Hi Divyesh
    Refer the below thread. The same problem was being solved.
    Mail Adapter - Multiple mail ID and multiple mail servers config.
    Here is the Summery:
    WRONG: receiver1@server1;receiver2@server2;
    CORRECT: receiver1@server1;receiver2@server2
    Regards,
    Madan Agrawal

  • Receiver Mail Adapter with external Email-Provider

    Hi everyone,
    I have implemendet an Scenario with a receiver Mail Adapter. With using the SAP-Mail-Server it works fine.
    Now I want to use an external Email Provider like GMX or yahoo. But the Parameter e.g. smtp://mail.gmx.net does not work.
    Is this generally with an external Email Provider possible?
    Thanks in advice
    Christoph

    Hi,
    of course it is, but:
    your XI has to see the external provider = opened ports
    Regards,
    michal

  • 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

  • Receiver Mail adapter - Text attachment

    Hi Folks,
    sorry to post again & again same issue.
    if i want to achieve (proxy 2 mail scenario) Payload as text attachment in email,
    do i need to use below 2 modules in My receiver CC?
    Number 1 as AF_Modules/StrictXml2PlainBean
    Number 2 as AF_Modules/MessageTransformBean
    is it right (the order which i used and Modules which i used)?
    Screen shot link of my config:
    http://farm4.static.flickr.com/3071/2951413865_498cb4f19b_o.jpg
    http://farm4.static.flickr.com/3027/2951427759_d4d3097826_o.jpg
    did i make any mistake on my config?
    Rightnow i am getting Business content data in the email message inbox only. I am not getting Business data as a attachment.
    do i need to use PayloadSWAPBean module also to achieve my req.?
    Inputs reg. this will be helpful.
    Thanks
    Praba

    HI Gaurav,
    I tested again for ur Try
    With XIALL option  - i am getting 2 files in a attachment
    file name: ATT00001.xml  - control records -
    output file name : Untitled.xml - Payload (business data)
    file name: ATT00001.xml  as a attachment in the email
    - XI PAYLOAD  with out any module( but default sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean - module will be there), with out keep attachments option
      output file name : Untitled.xml  as a attachment in the email
    XI Payload  with out any module ( but default sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean - module will be there), with keep attachments
    any one has idea on this, plz throw some inputs
    Thanks
    Praba

  • Dynamic attachment name with receiver mail adapter and use mail package

    We need to send mapped XML payload as attachment (with dynamic name) to a recepient (recepient email id is part of input xml payload, but not part of the mapped XML payload).
    I could probably do this using the adapter module (as per the following link),
    http://wiki.sdn.sap.com/wiki/display/XI/Adapter%20Module%20PI%207.0%20Set%20Attachment%20Name?bc=true
    I would like to explore if this would be feasible using Mail package and XI payload.I already have a Java mapping that is converting the input XML to required Output format. If I am using Mail package (XI Payload), how do I go about sending this Output XML from java mapping as attachment to email id available in the input payload?

    Hi,
    1) XML payload as attachment (with dynamic name)
    2) recipient (recipient email id is part of input xml payload, but not part of the mapped XML payload)
    These two is possible by using Mail Package. You have a standard xsd for mail package which you can download from the SAP Note 748024.
    The xml created in you java mapping which will be your attachment should be put into the <content> tag of the mail package xml structure. and the file name can be set in the <Content_Type> tag.
    <?xml version="1.0"; encoding="UTF-8"?>
    <p2:Mail xmlns:p2="http://sap.com/xi/XI/Mail/30">
    <Subject>My Invoice</Subject>
    <From>from email address<;/From>
    <To>to email address</To>
    <Content_Type>text/plain;name="MyFile.csv";</Content_Type>  --> file name here
    <Content>123;A49;aaa</Content>   -> attachment xml here
    </p2:Mail>
    And you have to select MailPackage in the receiver mail adapter.
    Regards,
    Aravind

  • Receiver Mail Adapter message with PDF attachment

    Hi.
    We are trying to generate emails from the mail adapter that includes the plain text in the body of the resulting email and an attached PDF file. We receive the following structure:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:newMailRequest_MT xmlns:ns0="http:/pdk/sap/TorstenTest">
       <Sender/>
       <Receiver/>
       <BodyContent/>
       <Subject/>
       <Attachment/>
    </ns0:newMailRequest_MT>
    I have set up an interface and mail adapter to be able to produce emails with plain text in the body. I used SAP note 748024 for this.
    So right now I can make XI send emails with dynamic mail addresses. My problem lies in sending attached files with the mails as well.
    I have read most of the threads in here, but none of them seem to answer just how to include the attachment. Which field in the 'Mail' message type is used for the attachment??
    What needs to be added to the communication channel and adapter for it to include attachments, while the body of the mail still keeps the plain text message??

    hi
    I have used the following links to send the file as an attachement and as payload.
    so it may help u.
    links:
    /people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure - Mail Adaptor options , mail attatchment
    Sender mail adapter - PayloadSwapBean - Step by step - https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/6d967fbc-0a01-0010-4fb4-91c6d38c5816
    /people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1685 [original link is broken] [original link is broken] [original link is broken]
    /people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter
    points if helpful.
    regards
    sreeni

  • Receiver Mail Adapter, Mail Package with Payload as Attachment

    Hi Everyone,
    I have spent the better part of the day today searching and testing all of the different combinations that I could think of to solve this problem, so please don't just do an SDN search for me and cut/paste in the links as there are too many contradictive answers piling up over the last year.
    I am trying to use a Receiver mail adapter to send some data using the mail package, and I want to have the <content> tag be in an attachment.  I am using mail package to dynamically set the mail address, but to also try and turn my data into a csv file that the recipient can open in Excel.
    My mail package sets the following values:
    <Content_Type>text/plain</Content_Type>
    <Content_Disposition>attachment</Content_Disposition>
    <Content>Sample Text</Content>
    This blog is basically what I am trying to do: 
    <a href="/people/community.user/blog/2006/09/08/email-report-as-attachment-excelword:///people/community.user/blog/2006/09/08/email-report-as-attachment-excelword
    But no where in here is he setting ContentDisposition, and he is (potentially) not using the MessageTransformBean module.
    It is unclear if I need to use the MessageTransformBean to make this work? 
    Questions:
    1) Do I need to use the MessageTransformBean?
    2) Do I need to set the ContentDisposition in the mail package?
    3) Does Service Pack matter with these settings?  We are on SP15 upgrading to SP18 very soon.
    Thanks
    Peter

    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

  • Excel file(.xls) as attachment and Body(Signature) via Receiver Mail Adapter

    Hi PI Experts,
    I have a requirement File(.txt) - PI(7.4) - mail (.xls attachment and signature in the body). Can anyone pls help me with the best approach to send excel file as mail attachment and signature in the body.
    Thanks,
    Sri

    Hi
    You can try this approach
    1. use mail package and java mapping to populate the mail package.
    inside the java mapping do the following
    a. read the text file and convert it to excel and then set it as additional attachment.
    b. map the signature and body with the field 'content' of mail package.
    2. on the receiver mail adapter check both mail package and keep attachment options.
    Hopefully this will work.
    Reference links
    excel write : Excel and Java - Read and Write Excel with Java - Tutorial
    set attachment: How to save MainDocument as additonal attachment in sender channel?

  • Not renaming attachment xml file name in receiver mail adapter

    Hi,
    I receive SOAP from GRC and need send to Partner an email.
    I have  SOAP to MAIL scenario where an xml file is picked up and transformed and zipped into the target format in XI which has to be sent as an attachement in an email on the receiver side.
    I am getting the mail with the attachement. But I would like to rename the attachment as the name "NFE.XML" and the ZIP File as the name "nfe.zip"
    I am using MAIL adapter with Modules above.
    Number  Module Name                                                                          Module Type                       Module Key
    1             AF_Modules/PayloadSwapBean                                           Local Enterprise Bean        Transform
    2             AF_Modules/MessageTransformBean                                  Local Enterprise Bean        ContentType
    3             AF_Modules/PayloadZipBean                                                Local Enterprise Bean        zip
    4             sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean    Local Enterprise Bean        mail
    Module Configuration :
    Module Key                           Parameter Name                Parameter Value
    Transform                             swap.keyName                 payload-name
    Transform                             swap.keyValue                 NFE
    ContentType                         Transform.ContentType    application/xml; name="NFe.xml"
    zip                                         zip.filenameKey                ContentType
    zip                                         zip.mode                           zip
    I  am using transport protocol  "XIPAYLOAD" and set  "KEEP ATTACHMENTS"
    I have with result example above :
    Name from ZIP              :  PayloadName.zipu200E(4KB)u200E
    Name from attachment :  PayloadName
    Regards,
    Ricardo

    Hi Shobhit,
    The module tab of your mail adapter will look like this.
    Processing Sequence
    Module Name                                                            Type                                      Module Key
    localejbs/AF_Modules/MessageTransformBean   rename LocalEnterpriseBean     
    sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean  mail     Local EnterpriseBean     
    Module Configuration
       Module Key               Parameter Name             Parameter Value
          rename      Transform.ContentDescription                      File
          rename  Transform.ContentDescription  attachement;filename="yourfilename.ext"                                                          
          rename            Transform.ContentType                 application/text;name="yourfilename.ext"
    Thanks
    Amitanshu

  • Receiver mail adapter - Payload as a Text attachment

    Hi,
    In my proxy to mail adapter scenario, when i want to send payload to email as a Text email, where i need to content conversion in XI (XML to Txt file)
    when i send payload, currently i am receiving as a XML file.
    I try to follow like Rushikesh Deshmukh XI thread: Text Attachment in Mail Adapter  in XI forum(topic)
    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."
    Could you tell me exactly where i need to do all these setting and
    do i need import localejbs/CreateAttachment Local Enterprise Bean XML2Plain...I mean shall i add same in my processing sequence
    give in detail ? (in Receiver mail adapter Communication channel,  advanced mode additional parameters)
    I tried to follow this also
    http://help.sap.com/saphelp_nw04/helpdata/EN/4e/c153426da9bd30e10000000a155106/frameset.htm
    but i could not find much info on this help.sap.com reg. req.
    Thanks
    Prabaharan

    Hi
    f i create like this Receiver CC (module Tab)
    number: 1
    Module Name: localejbs/CreateAttachment
    Module Type: Local Enterprise Bean
    Module Key: mail
    is it enough? do i need any other setting like this
    Did you deployed CreateAttachment on PI server. As this is not a standard SAP module this is a custom module?
    mail as module key is already used by XIMAILAdapterBean use some other key for CreateAttachment
    Settings are fine for the Module
    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
    In this:
    Module Key: XML2Plain
    Parameter Name: Transform.Class
    Parameter Value: com.sap.aii.messaging.adapter.Conversion
    is it right?
    Processing sequence is fine
    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
    can i anyone explain how to these settings?
    Is this key valid to provide inputs to the module check with the code for this module
    This looks like valid for MessageTransformBean ro StrictXMLtoPlainBean
    Thanks
    Gaurav
    Edited by: Gaurav Bhargava on Oct 15, 2008 5:34 AM

Maybe you are looking for