Skip to Content
Do you realy like receiving txt mails? Have you ever configured the mail adapter
to send such simple text content? Would you like to receive something like this yourself?
If not have a look at this weblog. I’ll present how with the use of simple XSLT transformations
you can start sending HTML mails from XI mail adapter both in the content of the mail and
also in the attachment. As you know within the XI you can use XSLT mappings and XSLT
does not only have to be used for XML to XML transformations. With it’s use
we can also change our XML documents into HTML files for example. This is a sample XML file
that I’ll try to send as an HTML mail from the XI.

image

With the use of many XSLT tools (or without any) we can easily transform our XML file into an HTML file.
This example shows my XSLT mapping inside transaction XSLT_TOOL (XSLT abap engine).

image

We can use this mapping inside our Interface mapping and it will generate an output
like shown below – hope you don’t mind the colours:-)

image

If we want to send the data inside our mail we have to configure our receiver mail adapter.

1. Sending HTML content inside the e-mail.

– set the message protocol to XIPAYLOAD

image

– configure the Module tab

image

2. Sending HTML content as an e-mail attachment.

– set the message protocol to XIALL

image

– configure the Module tab

image

Now our XI e-mails will look more like normal e-mails.

This weblog shows how simple it is to send a normal looking mail from the XI
with two different configurations (inside the mail and as an attachment)

To report this post you need to login first.

10 Comments

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

  1. Bhanu Nekkanti
    That’s a great Blog. If we use the XSLT as interface mapping, what will be the target message. And is ‘MessageTransformBean’ standard or do we need to create the module.

    Thanks,
    Bhanu

    (0) 
  2. amit kaul
    i am getting the following error . cld u let me know wht can be the problem .

    error occured: [2006-03-30T05:41:22Z] unable to call the mailer; com.sap.aii.messaging.srt.BubbleException: Failed to call the endpoint [null “null”]; nested exception caused by: java.net.ConnectException: Connection timed out: connect

    i have not configured any module

    (0) 
  3. Pablo Lopez
    Hi, Great blog, there is a bit of bug up there I think, you XSLT won’t create a target Message Type, therefore the Operation Mapping would give an error. Am I right?

    (0) 
    1. Michal Krawczyk Post author
      hi Pablo,

      >>I think, you XSLT won’t create a target Message Type, therefore the Operation Mapping would give an error. Am I right?

      no, you’re not right 🙂
      do you think I’d put a blog that does not work? 🙂
      check it yourself and you will see 

      BTW
      target message type is not validated

      Regards,
      Michal Krawczyk

      (0) 
      1. Pablo Lopez
        Hi Michal, your were right. I tested it myself and it doesn’t validate the target message type.

        Very useful blog, I forgot to mention that!

        Thanks.

        (0) 
  4. Indrajit Sarkar

    Hi Michal

    I have tested this blog with the option XIALL. I have got the html file but I have got the additional xml for SOAP envelope.

    Can you please tell me how to avaoid the additional soap xml message in the email.

    (0) 
  5. Kaar Tech

    hi Michel,

    I have a sftp to Mail pass through interface. and i have to pick file from SFTP server and send to user as a attachment with same name.

    I am able to send the message but sender name is not copying to attachment. it is showing as “untitled.xml”. we used ASMA parameter but it is not working.

    sending as ABCDEFG.txt but it is reaching as untitled.xml

    please suggest how to solve this issue.

    thanks in advance

    regards,
    Raj

    (0) 

Leave a Reply