Dynamic Mail Adapter Config

Hi All,
We're trying to use a dynamic mail direction in the mail adapter checking the Mail Package option as it's mentioned in: /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address (excellent blog).
But we have a mapping error in the SXMB_MONI:
RuntimeException in Message-Mapping transformation: Cannot produce target element /ns0:Messages
In the mapping we have one source message with the content of the mail and the direction, and two different structures for target. One with the mail package structure and the other with the target content.
Do you have any idea why we're having this mapping error?
Thanks in advance!

I'm trying to use the dynamic adress for mail adapter. So I've created an external object from the file mentioned in https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1361. [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]
Then I've done a multimapping, first message with the mail payload and the second with the contents of the mail.
In configuration, I've checked the Mail Package option and execute the interface.
Sender adapter and mapping was right, but there is an error in the mail adapter as follows:
error occured: [2006-05-29T14:38:31Z] 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 start tag: Mail, but found MM57_V01_COM_MONTH_MAIL_FILE at state 1
Any idea about this?
Thanks in advance!!!!

Similar Messages

  • Dynamic Mail Adapter using message split

    Hi,
    My requirement is like this:
    one flat file will come
    Sample Structure:
    Email_address   Custom_ID        Status             Comments   
    Many records will be there in that
    Sample data:
    som @ xi.   1234       approved        blablabla
    ram @ por   1236       approved        blablabla
    par @ mdm  1237      approved       blablabla
    vin @ gp      12348     rejected        blablabla
    Pi needs to pick the 1st record and construct an email with following information:
    email address: som@xi
    Likewise every record needs to be sent as email, and club the records in one mail if the mail address is same.
    How to go by!
    I have read the Micheals Blog:
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    And gone through the SAP note and downloaded the XSD.
    The XSD is may works only for one record, also occurance in XSD is (1,1).
    if Any other approach Please suggest me.

    I also tried that it is saying
    " Cannot load schema with the target namespace http://sap.com/xi/XI/Mail/30 to namespace http://blabla.com/IMG/INF2199"

  • Sender mail adapter config for MS Exchange Server

    Dear All Gurus,
    Need your advice on configuring sender mail adapter (mail to file scenario ) for exchange server. I have read a lot of SCN threads and other articles and was not able to find the exact solution for this. PI version : 7.3.
    Thank you all in advance...

    Hi,
    please check the below links.
    http://wiki.scn.sap.com/wiki/display/XI/Step+by+Step+Mail+To+File+Scenario  -  Mail to File
    http://www.riyaz.net/sap/xipi-configuring-the-sender-mail-adapter/90/
    Regards
    srinivas

  • When MAIL adapter failed to send the mail to recever, how does it handle XI

    Hi Experts,
            I used dynamic mail adapter, how do we track whether the mail has been successfully received by receiver,  if it is failed to send the mail by mail adapter how do we handle in XI. Please help me out.
    thanks
    siva

    Siva:
    There is one option in Mail Adapter (Receiver) "Send Delivery Status Notification". I think, it will help you to get the status. When you fill the above option, you are required to fill a recipient email id to whom, the status of the email will be emailed. From there, you can get the status. Please dig little more into this.
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm

  • Dynamic config for attachment without any message mapping in mail adapter

    Hi,
    In our scenario, we are not using any message mapping as a specification.A fixed length file is sent from source via proxy as an attachment to the mail.
    here the issue is with the file name of the attachment. how do we configure the attachment file name dynamically with out using any message maping.
    Regards,
    Divya

    Hi Divya,
    I understand you want to set name for mail attachment.
    SAP Note: Mail Adapter sapnote_0000856599
    Q: Can I choose the name of an attachment in the mail?
    A: Yes. Most mail clients use some heuristics based on some *MIME headers to derive the name of an attachment.* The MIME headers involved in most heuristics are Content-Type, Content-Description,and Content-Disposition. When you create an XI message, the XI payload name is automatically set in the Content-Description. If you want to change or set all of these headers, you can use the MessageTransformBean module (Note 793922) [Link|http://help.sap.com/saphelp_nwpi711/helpdata/en/57/0b2c4142aef623e10000000a155106/frameset.htm]
    in the adapter framework.
    Q: How can I set the file name of a mail attachment?
    There are several MIME headers that play a role in how the client retrieves the file name of an attachment. Unfortunately, this behavior differs among various mail clients. The reason for this inconsistent behavior comes from the fact that this mechanism has been extended incrementally. The old way is to use the name parameter in the Content-Type header as specified in RFC1341. For example, you can set the content type of an XML attachment as:
    Content-Type: application/xml; name="abc.xml"
    RFC1521 discourages the use of this name parameter in anticipation of the new header Content-Disposition, which is defined in RFC1806.
    With this Content-Disposition header, you can set the file name as:
    Content-Disposition: attachment; filename="abc.xml"
    Some clients may show the Content-Description value as the file name. The Content-Description header is typically used to associate some descriptive information to an attachment (RFC1341) as in
    Content-Description: my xml file
    To avoid potential interpretation problems, it is recommended to combine the use of these headers.
    Regards,
    Raghu_Vamsee
    Edited by: Raghu Vamsee on Feb 3, 2011 12:23 PM

  • Mail Adapter - Multiple mail ID and multiple mail servers config.

    Hi All
    I am doing BPM synch scenario in which i get the response from SAP box and send the response via email adapter. I am using mail.xsd and doing mail config. in message mapping. However in the TO field i am able to give only one email ID. If i give multiple email ID's mail is not received. I tried comma and semi-colon as separator. Still not working? I have two questions in configuring TO option:
    1) How to send to multiple id's? I am using Lotus Notes.
    2)How to send to multiple mail servers? I have to send to Lotus Notes id's and outlook express id's also simultaneously.
    Thanks for your help in advance
    Warm Regards
    Samuel

    Hi,
    Please find here with some observations about it,
    1) How to send to multiple id's? I am using Lotus Notes.
    If you have specified an IMAP server under URL, the message is saved in the specified folder but is not sent to the receiver specified under To.
    Then even if Under To, you had specified the e-mail address that will receive the message would be separated with a semicolon. It will not work.
    Please verify about it .
    The below link will also help you to verify if there is anything missing
    Mail Adapter (XI) - how to implement dynamic mail address
    /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    BPM:Single Sender and Multiple Receivers based on synchronous
    exchange(switch) part-1
    /people/prasadbabu.nemalikanti3/blog/2006/03/10/bpmsingle-sender-and-multiple-receivers-based-on-synchronous-exchangeswitch-part-1
    Generic Message Interface in SAP Exchange Infrastructure Email Integration Scenarios
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/00d5a235-4803-2a10-f682-889d67c69975
    (If your using Alert Framework then)
    If you want to send it to multiple email addresses and all email addresses are user of XI then you can define "Role" and attach that role to everyuser and make this role as receipent of alert .
    Thanks
    Swarup
    Thanks
    Swarup

  • Dynamic Filename in Receiver mail adapter is it possible without module?

    Hi,
    I need to send the file name in email adapter dynamically.Presently iam getting the filename as untitled.xml in the email .The keep attachments is checked in the mail adapter.
    I need to rename the file based on the input field name and timestamp .for example if i get the input field xxxx then the filename should be set as xxxx + timestamp .xml.I tried to use the UDF for dynamic configuration but it didnot help me out.Please help me.
    Thanks
    Rajesh

    Use below code snippet... It should work. If you want timestamp different change accordingly. Currently I do date followed by time as per my requirement.
    SimpleDateFormat simpledatFormat = new SimpleDateFormat("yyyyMMdd");
    Date date = new Date();
    String datewithYear = simpledatFormat.format(date);
    SimpleDateFormat simpledatFormat1 = new SimpleDateFormat("HHmmss");
    Date date1 = new Date();
    String datewithMs = simpledatFormat1.format(date1);
    DynamicConfiguration conf = ((DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION));
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File" , "FileName");
    String oldFileName=conf.get(key);
    String valueNew;
    if( oldFileName == null){
                           valueNew =oldFileNamedatewithYeardatewithMs+".xml";
    //set the new filename
    conf.put(key, valueNew);

  • Dynamic file name of the attachment in sender mail adapter

    Hi
    I have configured a sender mail adapter which receives some attachments.
    Right now the file name of the attachment is hardcoded to "MailAttachment-1" "MailAttachment-2" using the content-description from "AF_Modules/PayloadSwapBean" module.
    I want to set it to dynamic ie. instead of "MailAttachment-1"... i want it with real name of the attach.
    please suggest a solution w/o the need to develop a custom adapter module.
    Thanks!
    Regards,
    Mariano.

    Thanks Prateek,
    Now, i can see that the name of the original file is into the content type named as  text/xml; name"name of the file.xml" when i send the email from outlook.
    If i send it from hotmail, this is not happend.
    Do you know why happend this?
    If i always would have the original name inside the content type, my problem will be solved.
    Edited by: Mariano Vidal on Feb 13, 2009 2:26 PM

  • Dynamic filename in mail adapter

    Hi,
    how can I set the filename of a mail attachment dynamically in a receiver mail adapter (also dynamically configured)?
    I had to uncheck the "keep attachment" because of our scenario.
    If I check this box I get a .xml file which I can rename with the MessageTransformBean (but not dynamically?) but I get to much files in the mail.
    Now I get a .dat file and want to rename it dynamically in e.g. dynamicName.txt.
    Can you give me some input how to do that?
    Thanks in advance
    Dominic

    Hi
    <i>isn't it possible to set the filename of the attachment in the message-mapping?</i>
    --->
    Try writing this UDF so to get the name in mapping
    DynamicConfiguration conf = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
    DynamicConfigurationKey key = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    conf.put(key,a); // a - parameter given to UDF that specifies filename
    String ourSourceFileName = conf.get(key);
    return  ourSourceFileName; 
    Hope this helps

  • Dynamic Subjet in Mail Adapter

    Hi everybody,
    Landscape: I would like to fill dynamically the "Subject" field in a Mail Adapter. We receive data from a JMS Adapter and if no rule match the condition, it will send an email with the DCJMSCorreleation in the subject or in the body. In addition, we can receive flat or xml files.
    I tried to use an Mail Package, with a XSLT mapping but it doesn't run with a flat file (XML Parser error in Integration Engine). Then, I tried to use a SOAP adapter but we encountered the same issue with the flat file.
    Is someone can help me?
    -> How to allow flat file handling in XSLT or SOAP Adapter?
    -> How to get value from the SOAP Document?
    Many thanks in advance,
    Regards,
    Landry

    Many thanks for your help!
    With a Java Mapping (or UDF), it works perfectly. Here the code of the Java Mapping used in order to fill the DCJMSCorreleationID in the mail's subject:
    // Retrieve the DCJMSCorreleationID
                   trace = (AbstractTrace) param
                             .get(StreamTransformationConstants.MAPPING_TRACE);
                   DynamicConfiguration attrib = (DynamicConfiguration) param
                             .get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
                   DynamicConfigurationKey fileKey1 = DynamicConfigurationKey.create(
                             "http://sap.com/xi/XI/System/JMS", "DCJMSCorreleationID");
                   DynamicConfigurationKey fileKey2 = DynamicConfigurationKey.create(
                             "http://sap.com/xi/XI/System/Mail", "THeaderSUBJECT");
    // Set the mail subject with the DCJMSCorreleationID
                   attrib.put(fileKey2, "Unknown DCJMSCorreleationID: "
                             + attrib.get(fileKey1));
    Regards,
    Landry

  • Dynamic excel filename Receiver Mail adapter

    Hi all,
    May i know what is the way to dynamically set the file name of attachment in receiver mail adapter.
    Can we do using DynamicConfiguraion???
    If yes how?
    Thanks In Advance,
    H.L.Babu

    But i am not using any mail package.
    and also in adapter module i have written code like..
    byte by[] = generateExcel(is);
                      xp.setName(filename);
                      System.err.println("The name of the file."+filename);
                      xp.setContentType("application/vnd.ms-excel");
                xp.setContent(by);
                      System.err.println("After successful setting of XML Payload");
                msg.setDocument(xp);
                System.err.println("Message Set is successful");             
    But it is not getting the excact file name..
    Any coments..

  • Dynamic file name as mail attachment in receiver Mail Adapter?

    Hi,
    Can any one tell the possibility of attaching file as a mail attachment without using mail Package with dynamic filename.
    Business requirement is to send error response as mail attachment with dynamic name.
    Ex: Error_Response_20110802_13.24 where 20110802 is Date and next part represents time stamp.
    File attachment name should change dynamically in Mail receiver Adapter. Thanks
    Regards,
    Sreeramulu Konjeti.

    there is no standard way.
    you will have to write a module to get this in place.
    other ways are;
    XI Mail Adapter: An approach for sending emails with attachment with help of Java mapping - /people/stefan.grube/blog/2007/04/17/xi-mail-adapter-an-approach-for-sending-emails-with-attachment-with-help-of-java-mapping
    Dynamic name in the mail attachment - pseudo "variable substitution" :
    /people/michal.krawczyk2/blog/2006/02/23/xi-dynamic-name-in-the-mail-attachment--pseudo-variable-substitution

  • 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

  • How to set "Cc" field in Dynamic Email address in Receiver Mail adapter

    I have done the configuration for setting up the dynamic email address using the XSD provided by SAP in note no 748024. It is working fine.
    Michal's blog “Mail Adapter (XI) - how to implement dynamic mail address.” was a gr8 help in doing this.
    But there is no clue of setting up of "CC" in email.
    There should be "CC" in email is our bussiness requirement.
    Would appreciate your helps.
    with regards,
    Ravi Siddam

    Hi,
    If you do not need mail package for other reasons, I suppose it is enough to provide a value in Dynamic Configuration for fields "THeaderTO" and "THeaderCC" and the select "Use Adapter-Specific Message Attributes" and "Variable Transport Binding" in receiver Mail Adapter.
    see <a href="http://help.sap.com/saphelp_nw04/helpdata/en/6b/4493404f673028e10000000a1550b0/frameset.htm">SAP help</a> for more details.
    Regards,
    Daniele

  • Dynamic file name of the attachment in receiver mail adapter

    Hi
    I have configured a receiver mail adapter which receives the payload as an xml attachment.
    Right now the file name of the attachment is hardcoded to "invoice.xml".
    I want to set it to dynamic ie. instead of "invoice.xml"... i want it as "invoice<invoicenumber>.xml".
    Invoice number is present in the payload.
    please suggest a solution w/o the need to develop a custom adapter module.
    Thanks!
    Regards,
    Faria Mithani

    Hi,
    Go through this thread..
    Dynamic  File Name for Receiver File Adapter
    Regards,
    Sarvesh

Maybe you are looking for

  • CF10 Enterprise, multi-instance w/different user accounts

    Running CF10-Enterprise, 10,0,9,284568 with Update 9.  This is running under JDK 1.7.0_21, and is fronted by Apache 2.2.x and all runs under RHEL6.x.  It seems to work fine In short - is it possible to create a new instance, and have that new instanc

  • Getting "Unknown Error" whenever I try to Download from iTunes or App Store

    I first noticed something strange when my phone started randomly asking me to input my Apple ID password. Then my password stopped working on my Apple TV. It prompted me to reset my password, so I did. Now the new password is working on everything (A

  • Save for Web & Devices shortcut Alt+Shift+Ctrl+S not working

    Hi I've a really weird issue I'm running PS CS5 on Windows 7 on Dell XPS 1645 for some reason I'm unable to save for web using 'Alt+Shift+Ctrl+S' clicking the menu item works just fine however. This is driving me nuts any help or advice please??

  • RAC install on windows 2003 EE, intel xeon processor (x64)

    hello After i install clusterware i try run runcluvfy stage -pre dbinst -n rac2,rac4 -r 10gR2 on "checking node application existance..." get The application has failed to start becouse MSVCR71.DLL was not found. Re-installing the application may fix

  • Error in converstion exit CONVERSION_EXIT_CUNIT_INPUT

    Hi All.. I am getting the fallowing error while trying to load data from flat file(fu- fu book). "Error in conversion exit CONVERSION_EXIT_CUNIT_INPUT". The csv file has the following values as unit of measure "CS, DZ,EA and LB". I changed CS to CSE