Skip to Content

Please find the step by step procedure for sending a mail in a report
format below.

Let us see how XSLT mapping and mail package helps in sending a formatted
mail.

 

h4. Source structure

        image

     

 

h4. Import mail package as External Definition

        image

 

h4. Create Outbound Message Interface of type MT_Source

        image

     

 

h4. Create Inbound Message Interface using the imported mail package

        image

     

        image

     

 

h4. Interface Mapping: Select the mapping type as ‘XSL’ and
select the imported mail.xsl

        image

     

 

Now we are done with the design.

Activate all the relevant objects.

 

Do the normal configuration like any other scenario.

In the receiver communication channel make sure that you are selecting the
option

Use Mail Package

.

 

h4. Receiver Communication channel

        image

     

        image

     

 

Since we are using HTML tables for formatting, we can even copy the mail
as shown below and paste into Excel or Word document for reporting purpose.

 

h4. Copy the mail

        image

     

     

 

h4. This is how it looks when you paste in Excel

        image

     

 

h4. Pasting in Word looks like this in a tabular format

        image

     

 

The same can be done using any type of mapping, XSLT is not the only solution
for this.

But XSLT makes life simpler in this kind of scenarios.

Also see eMail Report as Attachment (Excel/Word).

To report this post you need to login first.

22 Comments

You must be Logged on to comment or reply to a post.

  1. During the migration process problems have been reported for this blog. The blog content may look corrupt due to not supported HTML code on this platform. Please adjust the blog content manually before moving it to an official community.
    (0) 
    1. Former Member
      thanks Prakash it is a good blog.
      But I also not get any headings in my email just the standard body values like:
      Delivery Number, Order Number, etc.

      Did you resolve this problem Matt?

      (0) 
        1. Former Member
          I am refering to “These deliveries has been completed:”

          Delivery Number   OrderNumber  (this line is available)
          0080674770        000326       (this line is emtpy)

          (0) 
          1. Hi Roy,<br/><br/>Are you sure you added this line<br/><xsl:text xsl:space=”preserve”>These deliveries has been completed:</xsl:text> <br/>in your XSLT as shown in the blog.<br/><br/>0080674770        000326       (this line is emtpy)<br/><br/>If the above line is not appearing check if you have given correct XPATH (including the namespaces if any)<br/><br/>Regards,<br/>Prakash

            (0) 
            1. Former Member
              Hi Prakash,

              Yes I have, I have build your scenario, so all the lines are identical like in your Blog.

              Only when I add the xsd as External Definition I see thow Messages in the Messages tab.
              MailReceipt and Mail.

              Where can I check if I use the correct XPATH?

              At Imported Archives, where I open the zipped xsl mail, there is my Path empty, is that correct? and how can I add there a path name?

              (0) 
              1. Hi Roy,

                In the XSLT program just try changing the line “MT_Source/row” to “//row”. This is another way to represent the XPATH

                If you still face the problem do let me know and post your source XML.

                Regards,
                Prakash

                (0) 
  2. ranga rajan

    Very nice Blog .  I am getting only Headers Like  DeliveryNumber  OrderNumber  Ship_To Name like that no data .<br/><br/>     My Source Message Type is having structure like   MT_FILEINPUT/Record/Row  with in that Row whole structure whole data is there . Target i am setting as Mail package .<br/><br/>      <xsl:for-each select=”ns0:MT_FILEINPUT/Record/Row”><br/><br/>     I have added all things what you have specified like.,<br/><br/>  <xsl:text xsl:space =”preserve”>These Deliveries has been Completed</xsl:text?<br/><br/><br/>       May I Know what mistake i have done ? Is there any mistake in XPATH  function.<br/><br/><br/>        it is Really Excellent Blog please Keep Blogging<br/><br/>Best Regards.,<br/>V.Rangarajan<br/><br/>

    (0) 
  3. Former Member
    suppose I want to send this email report dynamically to the email address which is stored in the one of the field(say BilltoID), then what changes are required in XSL mapping prgram or any other changes?
    please suggest ASAP. I am facing this problem.
    you can mail me-rhushikesh7584@gmail.com
    (0) 
  4. Former Member
    I have an XSLT attachment as html format.  I want to dynamically assign the to and subject of the email based on the payload data.  How is this possible?
    (0) 

Leave a Reply