Dynamic email config in PI7.1

Hi,
The scenario is like this...
R3 sends out a message to PI. There is a mapping to EDIFACT.
The EDIFACT message should be sent to an email address that can be found in the Idoc.
I have created an UDF, based on what I've found here at the forum, to set the email header.
//AbstractTrace trace = container.getTrace();
    Map map = container.getTransformationParameters();
DynamicConfiguration attrib = (DynamicConfiguration) container.getTransformationParameters().get(StreamTransformationConstants.DYNAMIC_CONFIGURATION);
DynamicConfigurationKey fileKey1 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/Mail", "THeaderTO");
DynamicConfigurationKey fileKey2 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/Mail", "THeaderFROM");
DynamicConfigurationKey fileKey3 = DynamicConfigurationKey.create("http://sap.com/xi/XI/System/Mail", "THeaderSUBJECT");
// Set the mail subject
attrib.put(fileKey1,var1);
attrib.put(fileKey2,var2);
attrib.put(fileKey3,var3);
return "";
The CC is set to use XIPAYLOAD as Message Protocol
I've checked these boxes...
Keep Attachments
Use ASMA
Variable Transport Binding
All works just fine except for one thing...
In the mail I get two attachments, one is the correct EDIFACT message, the other is an XML-file that looks like this...
<info>Converted message locates in attachment with id PRICAT_UN_D01B</info>
How can I get rid of that xml-file in the mail? I just want to send the EDIFACT file.
Thanks for your help!
/Sten

Hi,
I have a source structure as an Idoc and target structure is a message type created for a
custom flat file format.
If you want to send email message to a person and want that the message (attachment) reaches him/her in the mailbox
then you cannot use a custom Flat file Format in your target structure. The structure has to be the one mentioned in this link:
https://websmp205.sap-ag.de/~sapidb/012006153200000361852004E/ximail30_xsd.txt
Save this structure as External definition and build MI, mapping using this external definition. No other structure would do.
Do both these structures have the same namespace as mentioned by you.
No...as the source is an IDOC it will have the namespace of SAP system....
You need to perform a XSLT mapping to extract only the payload from the IDOC message and then pass it as a string to the Content Field of the target mail message...
I have attached a digram in SDN-Wiki which tells you what namespace I am refering to.
SDN-Wiki --> SAP NetWeaver Technology --> Process Integration --> Attachments..
Search for the attachment against my name and having "NamespaceInXSLTMapping" as comment.
But I need the attachment to be a text file.
No problem:)....no UDF/JAVA coding needed...you can convert the attachment to the format you want..just you need to mention the appropriate Content_Type
Refer this blog and your problem will be solved:
/people/community.user/blog/2006/09/08/email-report-as-attachment-excelword
For checking which Content_Type is available and which one is suitable check this link:
http://www.utoronto.ca/ian/books/html4ed/appb/mimetype.html
Regards,
Abhishek.

Similar Messages

  • How to configure dynamic email address for notification

    All,
    I have a problem in assigning dynamic email address for notification activity in a bpel process, I want to assign a user from a user-properties file. How do I achieve this. I tried using the users in System-jazn-data.xml file, but if i add a email attribute to the existing users it doesn't show up. I am sure there should be an easier way of using identity service and adding attributes to the jazn realm user, I might be missing something.
    I cannot have it as part of the payload the only way is to use identity service.
    Thanks,
    Chitra

    Hi James,
    Thanks for the reply. Its solved now. For anybody if interested you can set the dynamic email address either i) having it as part of payload - In this case use the xpath to query the payload varaible ii) use identity service - follow the following steps
    1.Create a user in Application enterprise manager/also you can use a existing account, if u are creating a new one assign the correct role
    2. In either case edit the user-properties.xml(bpel/system/services/config) file for the corresponding user and add an attribute called email
    3. Bounce the server for this changes to take effect
    4. In the notification properties in the to address use ids:getUserProperty and pass the attribute name

  • Email from flex using dynamic email address

    I have an http service call that populates a datagrid. The user drags one or more items to a "favorites list". The user then emails this favorites list to himself. My ISP says they cannot handle dynamic email addresses which is apparently what I need to use. Any ideas or other ways to handle this? I am using PHP to handle the email function.

    Mehabub Sheikh wrote:
    We are using lotus notes for emailing.
    Is it possible to configure APEX for sending email using Lotus Notes 8.5?Yes, inasmuch as I've worked on a project that did so. Their DBA just used the standard APEX mail config: +Configuring Email+
    Notes didn't play as well with the APEX mail API as others: {thread:id=2379927}

  • 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

  • How to set "Cc" field in Dynamic Email address in Receiver JDBC 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,
    See fragment from help,
    Specifications for mail attributes:
    &#9675;       Under From, specify the e-mail address from which the message is sent.
    &#9675;       Under To, specify the e-mail address that will receive the message. If you enter more than one address, you must separate them with a semicolon.
    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.
    &#9675;       Under Cc, specify the other e-mail addresses to which the e-mail is to be sent.
    These addresses are visible to the receiver.
    &#9675;       Under Bcc, specify the other e-mail addresses to which the e-mail is to be sent.
    These addresses are not visible to the receiver.
    &#9675;       Enter the Subject of the e-mail message.
    &#9675;       Specify whether you want to encode the content of the e-mail message. You have the following options:
    &#9632;       None
    &#9632;       Base64 (default value)
    &#9632;       quoted-printable
    Hope this helps.
    Regards,
    Akshay.
    reward points if find useful.

  • 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

  • Dynamic email address in MAIL adapter

    Hi ALL,
                 Is there a way of sending dynamic email addresses in mail adapter?
    Regards,
    XIer

    Xier,
    Yes. You can do it. Using Mail adapter option with Use MailPackage option.
    raj.

  • Dynamic Email with Complete PDF sent

    I have a Livecycle form with multiple email list and I need to send the complete PDF to the dynamic email can anyone help me please?

    Create a button - not a submit button.
    On the click event here's the code that did it for me:
    var email = xfa.resolveNode("ApprovereMail").rawValue + ";"+xfa.resolveNode("AdmineMail").rawValue;
    var subject = "Your subject goes here;
    var body = "Your body goes here";
    event.target.submitForm({cURL:"mailto: "+ email +"?subject=" + subject +"&body=" + body,cSubmitAs:"PDF",cCharset:"utf-8"});

  • Dynamic Email Button

    Hi Everyone
    I know how to setup a Dynamic Email button which will format the Body of the Email using \n  and some of the others like \t and \r but are there others? Is there a way to control the font size, color, or alignment like centering? Thank you in advance.

    I tried that but it is interesting that if I create a new message in outlook it is in a format of
    html and if I use the email button in the pdf it creates it in plain text which just displays the text in this format.
    <html>/n/n/n<body>/n <p>/n <center>Center</center>/n </p>/n </body>/n </html>/n
    Any suggestions?
    the control used to open outlook and attach is
    this.mailDoc({bUI: true, cTo: cToAddr, cCc: cCCAddr,
                      cSubject: cSubLine, cMsg: cBody});

  • Dynamic email group of addresses

    Hello everybody,
    I need to map in the 'To' field of an email a group of email addresses and I would like to hear some suggestions about it, I've already implemented the dynamic email address with the email 3.0 strcuture but now I need to define a group of users as in example if I define for some interface Group1 I need to have stored all the email addresses for that group somewhere so in the mapping I can concatenate those addresses to map them in the field 'To', I've never used value mapping before and I don't know if this could help me, any suggestions????; i'm thinking on maybe have a Z user table in the ABAP Instance so I can query for a group what addresses I need to send the email, but I don't know if there's a better way to do this without having to generate a Z table, thanks in advance.
    regards,
    Julio Cesar

    Hi,
    You can do a RFC lookup from your mapping by calling the RFC function module. Once you get the group of email address from Z table , you can map it to the To field and can send email to the group of users.
    For more information on how to use RFC lookup From a udf, refer to the link below.
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/a03e7b02-eea4-2910-089f-8214c6d1b439
    Thanks
    Amit

  • Making dynamic emails clickable

    I tried mailto: in the link area, that creates a blank mail.
    I tried dragging the dynamic email fropm the recordset. That is not
    allowed. How do I get the results page email to be automatically
    open and populate an email?
    Jim Kemble

    If you are using PHP/MySQL put this, modified for your DB, in
    the link property of your cell in the repeating table region:
    mailto:<?php echo $row_rsUsers['email']; ?>
    So your table cell would then contain something like this:
    {rsUsers.email}
    And the link property for that cell would be the first line
    of code above. Instant dynamic e-mail clicky.
    Glenn

  • Dynamic email recipients

    Hi,
    I want to execute an exceptional report. say for example, for customers with sales volue more than 10000 USD, we want to send mails only to those customers that have sales value more than 10000 USD. How do we configure this dynamic email recipients ?

    Carolina,
    Thanks fr your reply. I have done sending exception reports to sap users, but, I had to mention the users in the email recipient list. Here, in this scenario, I dont know the email recipients list, since this list depends on the exception report. Only the users having the exceptional sales values need to get the email not everyone.
    because of this, the recipient list will vary everyday based on the exceptional values.
    solution ?

  • How to map CC to Dynamic Email Recipient

    Hi ,
    I am using BO XI 3.1.
    I created a Publication with source Document as Web Intelligence Report and used Dynamic Recipients (Source Web Intelligence Report). I have configured the destination as Email and sending report in PDF format as attachment.
    The publication is working fine.
    Her my question is; I want to add CC in the mail which also should be dynamic. That means I want to pick up the email addresses from same Source Web I Document which contains column for CC. But there is no additional placeholder available to map CC Email address.
    Can any one tell me how can I achieve this?
    Is there any way so that I can Add additional place holder (eg. %SI_EMAIL_ADDRESS2%).
    Or there is any other way around using SDK.
    Please advice.
    Thank You,
    With regards,
    Sachin Dalal

    Thanks Leon,
    But this is the requirement from business users and they are not ready with any work around.
    I have resolved this.
    Instead of using Email as Destination, I used Files System as destination.
    The list of desired recipient along with filename to be sent in email as attachment and its location is stored in database table.
    And created one small Java utility which will send an email with file attachment from the file folder and send it to the desired email receipient by reading from the above database table. I scheduled this small java utility after execution of the Publication.
    Thanks,
    Regards
    Sachin Dalal

  • Dynamic Emails in MAIL

    Experts,
    My Scenario is File-to-MAIL and i have used XSLT mapping.
    Referred Blog; /people/community.user/blog/2006/09/07/email-reporting
    I'm good with ouput.. but here email-IDs are embeded in the XSLT mapping.. how do i give these email-ID dynamic?
    Note: The File is dropped by MDM system containing customer/product, so i will not be able pass the email-IDs in the source file. so couldnt refer blog; /people/michal.krawczyk2/blog/2005/03/07/mail-adapter-xi--how-to-implement-dynamic-mail-address
    I have browsed throuth the threads but coulnt cath up with correct answer.

    The problem is solved: using DynamicConfigurationBean  Thanks for all your answers:
    Solution:
    - Do not mention To feild in the XSLT mapping
    - in Configuration; for MAIL communication channel; go to MODULE tab n give the below parameters;
    Processing Sequence:
    no'                 Module Name                               Type                  Module key
    1      AF_Modules/DynamicConfigurationBean                     Local Enterprise Bean                 5
    2      sap.com/com.sap.aii.adapter.mail.app/XIMailAdapterBean  Local Enterprise Bean                 2
    Module Configuration:
    Module Key        Parameter Name              parameter Value
    5          key.1                      insert http://sap.com/xi/XI/System/Mail THeaderTO
    5          value.1                   <Email-ID>
    - Go to ADVANCE tab n check Use Adapter-Specific Message Attributes
    check Variable Transport Binding  in text box give the value "XHeaderName1"

  • Dynamic Email Addresses in Mail Adapter in PI 7.1

    Hi All,
    I am having trouble populating email addresses in the structure and sending them. I have a source and target structure. The target structure should be sent as a mail attachment. I have created the external defintion of the mail attributes from the blog https://www.sdn.sap.com/irj/sdn/weblogs?blog=/pub/wlg/1361. [original link is broken] [original link is broken] [original link is broken] Now my message mapping is multi-mapping. Its 1: 2 messages. And my operation mapping also has one source and 2 target interfaces. Now in Interface determination I gave the same mapping and both the messages showed up. But when I execute the scenario, its giving a mapping error, though its working in ESR.  Can anybody please help me out here.
    Please do not send me links to
    /people/prasad.ulagappan2/blog/2005/06/07/mail-adapter-scenarios-150-sap-exchange-infrastructure or /people/jayakrishnan.nair/blog/2005/06/20/dynamic-file-name-using-xi-30-sp12-part--i .
    Thanks,
    Geetha

    Hi,
    Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException:
    Error: invalid XIMailAdapter channel
    This problem is answered in this thread:
    invalid XIMailAdapter
    Regards,
    Abhishek.

Maybe you are looking for