Mail Adapter & Mail package - pb of content

Hi,
I want to send an email from XI to my mail server (Lotus) by using the Mail Adapter with option "Use mail package".
I have just succeed to send email with only <b>ONE line</b> because of field "content" which has an occurence 0..1.
How is it possible to have several lines?
When I try to duplicate field "content" or to change its occurence (0..Unbounded), then I don't receive an email?
<i>Note: Unfortunatelly, I don't know XSL / XSLT mapping.</i>

If you want to have several lines, you have to put EOL within the one "content" tag like this:
<ns:Mail xmlns:ns="http://sap.com/xi/XI/Mail/30">
  <Subject>Hello</Subject>
  <From>[email protected]</From>
  <To>[email protected]</To>
  <Content>row1
row2
row3
row4</Content>
</ns:Mail>
Sorry, I can only give you an XSLT example to do this.  Assume your original message payload is:
<root>
  <text>row1</text>
  <text>row2</text>
  <text>row3</text>
  <text>row4</text>
</root>
you can use following XSLT file, which you attach directly to the Mail Adapter (like described in another thread):
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
  <xsl:output method="xml" indent="yes" />
  <xsl:template match="*">
    <ns:Mail xmlns:ns="http://sap.com/xi/XI/Mail/30">
      <Subject>Hello</Subject>
      <From>[email protected]</From>
      <To>[email protected]</To>
      <Content><xsl:apply-templates/></Content>
    </ns:Mail>
  </xsl:template>
  <xsl:template match="text">
    <xsl:value-of select="."/>
  </xsl:template>
</xsl:stylesheet>
Regards
Stefan

Similar Messages

  • PayloadZIPBean with Mail Package... is it possible?

    Hi,
    In proxy to file scenario, I send mails from PI with data received from proxy as attachment. I also need to zip the attachment.
    I will be getting the email address dynamically, hence I should use Mail Package with 'Keep Attachments' option. Now the problem is if I use mail package since the <content> tag data is taken as mail attachment, can I use PayloadZipBean in receiver mail adapter to zip the attachemnt?
    I tried using the follwoing adapter module in receiver mail mail adapter but ended with an error.
    Module Name: AF_Modules/PayloadZipBean                             Module Key: zip
    Module Config:
    zip             zip.filenameKey                   payloadName
    zip             zip.mode                              zipOne
    Error:
    org.xml.sax.SAXParseException: Content is not allowed in prolog
    Regards,
    Sreedhar

    Hi Sreedhar,
        Have you looked at this help link?
    http://help.sap.com/saphelp_nwpi711/helpdata/en/45/da9358a1772e97e10000000a155369/content.htm
    Also see :
    Zip Payload using PayloadZipBean Module Processor
    Regards,
    Ravi Kanth Talagana
    Edited by: Ravi Kanth Talagana on Oct 22, 2009 5:13 PM

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

  • Mail Adapter: Working with mail packages

    Hi All
    I am having a receiver mail adapter.
    I am using mail package to send data as a text file attachment.I am getting the following error:
    failed to send mail: com.sap.aii.messaging.util.XMLScanException: expecting start tag: Mail, but found TM_Mail at state 1
    How can i override my current namespace with the recomended namespace 'http://sap.com/xi/XI/Mail/30}Mail'??
    Thanks
    Chandra

    I am trying to use the mail package as well and no e-mail delivered.  However,  when I do not use the mail package an use mail attribute and remove the code below it works fine.
    <?xml version="1.0" encoding="UTF-8"?>
    <ns:Mail xmlns:ns="http://sap.com/xi/XI/Mail/30"> 
    <subject>824 test</subject>
    <from>edi/@/na.modine.com</from>
    <to>s.m.posnanski/@/na.modine.com</to>
    <reply_to>edi_support/@/na.modine.com</reply_to>
    <content_Type>text/plain</content_Type>
    <content>
    Hello
    </content>
    </ns:Mail>
    Can some provide the settings that are needed in the Module tab when using the "Mail Package" option??

  • Error in mail adapter whilst using 'mail package' option

    Hello,
    I am using receiver mail adapter. Its working fine when I do not use 'mail package option'. But when I use mail package option, this error comes in
    Message processing failed. Cause: com.sap.aii.af.modules.conversion.xml2plain.ConversionException: No data is allowed on this structure level (2) at XML element Mail,Subject
    This is the sample of payload:
    <?xml version="1.0" encoding="UTF-8" ?>
    - <ns1:Mail xmlns:ns1="http://sap.com/xi/XI/Mail/30">
      <Subject>Data Update to  Portal failed</Subject>
      <From>sender email id/From>
      <To>receiver email id/To>
      <Reply_To />
      <Content_Type>text/plain</Content_Type>
      <Content>Error: Undefined Error</Content>
      </ns1:Mail>
    Any idea what should I do to get it working. Alternatively, is it possible to use the dynamic value into the email 'TO' field.
    Thanks in adavance

    Hi All,
    I need the same info in my requirement . The Scenario is MAIL > FILE . THe Vendor sends the email with  Invoices ( An Attachment) to a mail server and the attachment has to be moved to the network folder (File )
    Here , I used  IMAP4 Protocol in MAil Sender CC
    I wanted to know is it  required to use :localejbs/ AF_Modules/PayloadSwapBean and any module configuration to petch the attachment  ?

  • Mail Adapter Use Mail Package, Mail Body and Attachment

    Hello
    Have some body a idea, how I can configure the mail adapter with use mail package, that I have in the mail a attachment with content from the messages and a mail body with also text from the message.
    Thanks for your reply.
    Regards Tom
    The different Weblog , I have check:
    /people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure
    https://www.sdn.sap.com/sdn/weblogs.sdn?blog=/pub/wlg/1685 [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken] [original link is broken]
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address

    Hi Thomas,
    If you are configuring your Mail adapter as reciever then refer
    http://help.sap.com/saphelp_nw04/helpdata/en/6b/4493404f673028e10000000a1550b0/content.htm
    your sender (say file) should have some message like this
    <i>
    <ml:Mail xmlns:ml=’http://sap.com/xi/XI/Mail/30’>
       <Subject>Important</Subject>
       <From>[email protected]</From>
       <To>[email protected]</To>
       <X_Mailer>Outlook Express </X_Mailer>
       <Content>
       This is the content.
       </Content>
    </ml:Mail></i>
    And for Sender Mail Adpater
    http://help.sap.com/saphelp_nw04/helpdata/en/23/c093409c663228e10000000a1550b0/content.htm
    Hope this will be helpful
    Regards
    Suraj

  • Mapping to Mail Package Content

    Hi,
    I'm trying to get information from an IDoc into the "Content" tag of the Mail Package structure. The format of the content should be a few values separated by semicolons and then "End Of Line" character after each line of values. Ex.
    <Content>VAL1;VAL2;VAL3 "EOL" VAL4;VAL5;VAL6 "EOL" VAL7;VAL8;VAL9</Content>
    The semicolons can easily be created using the concat function, but how do I get the EOL character in there so that the end result of the content attachment out of the Mail adapter becomes:
    VAL1;VAL2;VAL3
    VAL4;VAL5;VAL6
    VAL7;VAL8;VAL9
    So, in other words the result should be CSV with EOL characters.
    Solutions that work will be highly rewarded!!
    Thanks,
    Mattias

    write a simple UDF...
    the code in it would be just one line...
    return (""+ ((char)10) );
    i am assuming you want the "new line" at the end..right ?
    for new line it is "((char)10)"...for carriage return it is "((char)13)"...

  • Receiver Mail adapter - mail package - mail not received

    Hi guys!
    I'm using receiver mail adapter and when I want to use Mail Package (subject is assign dinamically based on mapping) I do not receive the e-mail. When I switch to not using Mail Package, the mail is sent correctly..
    In RWB everything seems to be ok, it says mail sent successfully... just not to my outlook
    Any ideas, what could be wrong?
    Thanx a lot!
    Olian

    Hi Stefan,
    thank you 4 reply..  I checked it. To be sure - I copied the content of the To tag and put it into my Outlook and sent an e-mail... It has arrived
    I can't understand this..
    Which fields are neccessary to fill? Is from, to and content enough? I think it should be...
    Thank you!
    Olian

  • Dynamically pass subject via mail adapter without using mail package

    Hi,
    We have requirement to pass the Dynamic variable as Mail subject
    we can't use Mail Package as we need to capture the data from Dynamic SOAP header Data from incomming channel
    Dynamic SOAP Header variable (XHeaderName1) comming from Sender SOAP channel.
    Receiver side we need to capture that XHeaderName1 in Mail Adapter channel using ASMA and Variable transport binding so that value of XHeaderName1 should overwrite Subject under General/ Mail Atribute section.
    Could you please let me know, how to handle this requirement using module configuration?
    Also suggest the correct configuration to use ASMA and Variable transport binding.
    Regards
    Venky

    Hi Venky,
    Please have a look at the links below. They should help you.
    Configuring the Sender SOAP Adapter- https://help.sap.com/saphelp_nw04/helpdata/en/fc/5ad93f130f9215e10000000a155106/content.htm
    Configuring the Receiver Mail Adapter-https://help.sap.com/saphelp_nw04/helpdata/en/6b/4493404f673028e10000000a1550b0/content.htm
    Adapter-Specific Message Attributes in the Message Header  -https://help.sap.com/saphelp_nw04/helpdata/en/43/0a7d1be4e622f3e10000000a1553f7/content.htm
    Regards,
    Jannus Botha

  • Mail Receiver adapter - dynamic file name without mail package

    I know that we can get the dynamic attachment name using mail package... As per the FAQ Mail adapter, the Mail package use is deprecated and hence we do not want to go that route.
    I have seen the following wiki entry for setting the file attachment name...
    http://wiki.sdn.sap.com/wiki/display/XI/Adapter%20Module%20PI%207.0%20Set%20Attachment%20Name?bc=true
    Is this the only approach to dynamic attachment name using Mail adapter (and without Mail package). Or a different approach without Adapter module is possible?

    There is a different approach without using mail package or adapter module.
    Have a look at this Wiki:
    http://wiki.sdn.sap.com/wiki/display/ESOAInfrastructure/Dynamic+Email+Attachment+name+for+Received+Mails+with+ASMA+and+without+using+mail+package

  • How to maintain mail package option features with ASMA in mail adapter

    Hi Friends,
    While going through mail adapter sap notes I found that Mail package is deprecated, Can any one please give me an idea how to get these features that is header information (TO,From,Subject)  with ASMA(Adapter specific message attributes)
    Best Regards
    Raj

    This [link |Sender Mail Adapter ASMA issue - due to limitation of length upto 200 only.;address your issues... using header attributes length of the field < 200 might help.
    Have you seen help site
    http://help.sap.com/saphelp_nwpi71/helpdata/en/ad/bf93409c663228e10000000a1550b0/frameset.htm

  • Mail package in receiver mail adapter

    Hi ,
    I am trying to put XIPAYLOAD with <b>USE mail package</b> option.I have gone through the blogger posted my Michal on this...
    when I download the Document mentioned in the blog for mailpackage to create the message  do I need to use the <b>namespace</b> "http://sap.com/xi/XI/Mail/30" as it is or I need to replace the namespace in the document with my namespace...
    some one could you please explain it little clearly...what is the use of this namespace..and how do I exactly proceed to make use of this document...
    Thanks a lot.....

    hi
    There are several scenario's
    have a look at following :
    /people/sap.user72/blog/2005/05/02/useful-sap-notes-for-xi
    /people/michal.krawczyk2/blog/2005/11/23/xi-html-e-mails-from-the-receiver-mail-adapter
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    /people/michal.krawczyk2/blog/2005/12/18/xi-sender-mail-adapter--payloadswapbean--step-by-step
    /people/sravya.talanki2/blog/2006/01/12/xi-triggering-e-mails-with-multiple-attachments--problems
    /people/community.user/blog/2006/09/08/email-report-as-attachment-excelword
    /people/sap.user72/blog/2005/01/06/how-to-process-csv-data-with-xi-file-adapter
    /people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure - Mail Adaptor options
    https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1685 [original link is broken] [original link is broken] [original link is broken] - File to Mail
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address - Dynamic Mail Address
    and for further
    you can follow
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address - Dynamic Mail Address
    i hope this will help you.
    Pls : Reward points if helpful
    Vishal

  • Mail adapter fails when using Mail Package Format

    Hi.
    Using XI 3.0 stack level 9.
    When i set up the mail adapeter to Use mail package format (by ticking the "Use Mail Package") checkbox I get the following error :
    "error occured: [2005-09-14T09:42:46Z] unable to call the mailer; com.sap.aii.messaging.srt.BubbleException: Failed to call the endpoint  [null "null"]; nested exception caused by: com.sap.aii.messaging.util.XMLScanException: expecting end tag: Mail, but found Subject at state 1".
    The scenario is basic : file in mail out.
    File coming in has the structure :
    <ns:Mail xmlns:ns="http://sap.com/xi/XI/Mail/30">
      <ns:Subject>Sap test</ns:Subject>
      <ns:From>SAP</ns:From>
      <ns:To>[email protected]</ns:To>
      <ns:X_Mailer>Outlook</ns:X_Mailer>
      <ns:Content>Contect</ns:Content>
    </ns:Mail>
    Any help would be appreciated.

    Hi Rodney,
    try to use the following structure...
    <ns:Mail xmlns:ns="http://sap.com/xi/XI/Mail/30">
      <Subject>Sap test</Subject>
      <From>SAP</From>
      <To>[email protected]</To>
      <X_Mailer>Outlook</X_Mailer>
      <Content>Contect</Content>
    </ns:Mail>
    The namespace should only be included in the Mail tag. On our side it works fine with the mentioned structure.
    Hope it helps...
    Regards,
    Lars

  • Outbound Mail Adapter Mail Package

    Hi there,
    I have a problem in a XI-Scenario.
    There is an incoming mail with a CSV-File as an attatchemant.
    It s transformed by an itemfield-module into xml-soap.
    Then the message is mapped and end to a sap-hr via rfc.
    This is how far it works.
    my problem is, that i need the emailheaddata, and i dont know how to get it. The atribute 'use mail package' is activated. but how can i reach the information from the mail package in the mapping where i need the information about the sender?
    best regards
    Harald Cremer

    hi,
    if you won't be able to do it in amy other way try this:
    create an adapter module in which you will
    get the header data
    and put it into the dynamicconfiguration
    then you will be able to get it from your mapping
    easily
    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>

Maybe you are looking for

  • How to collect the deleted query in a transport request.

    Hi Friends, I have created a query and transported it to the Quality, the data content is all ok, except that i have not used the Project Naming conventions. Now i have a defect against my name for this. I have to copy the same query with the correct

  • Can't boot into Windows 8.1 partition after apple store repair

    Can't boot into Windows 8.1 partition after apple store repair I went to the apple store about a week ago to get my screen fixed, and when I get it back I don't have an option to boot into my windows partition. The bootcamp partition is still there,

  • Subscription not updated

    My Sype subscription minutes has not been updated since payment was taken on October 27 2011 although confirmation email rec'd stating that it has. Order number 542881515

  • SE54 - View Cluster maintainence problem

    Hello Guys I'm creating a VC for bunch of tables which is working fine but for one of the table it give me error message when I enter data and save it. Error is: Please only enter valid values. Message no. SV530 Diagnosis You have entered a value whi

  • HP Mouse x1000 not working in Windows 8

    I picked up the x1000 mouse in Argos yesterday as I needed a cheap temporary replacement for my excellent Logitech mouse that I left at my parents house. Naively I assumed that like the Logitech and all other usb mouses I have owed in the past it wou