Skip to Content
Author's profile photo Michal Krawczyk

XI: HTML e-mails from the receiver mail adapter ?

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)

Assigned Tags

      10 Comments
      You must be Logged on to comment or reply to a post.
      Author's profile photo Former Member
      Former Member
      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

      Author's profile photo Former Member
      Former Member

      I have a question

      How can we write this mapping in Altova mapforce and test it.

      Thanks

      Author's profile photo Former Member
      Former Member
      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

      Author's profile photo Former Member
      Former Member
      Michal

      This is a great Blog.  Keep up the excellent work!  You should put all these great ideas of your into another book!

      Author's profile photo Michal Krawczyk
      Michal Krawczyk
      Blog Post Author
      hi Barry,

      thank you:)
      hope you bought the first one hehe ๐Ÿ™‚

      BTW
      are you at SAP teched in DE now by any chance?

      Regards,
      Michal 

      Author's profile photo Former Member
      Former Member
      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?

      Author's profile photo Michal Krawczyk
      Michal Krawczyk
      Blog 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

      Author's profile photo Former Member
      Former Member
      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.

      Author's profile photo Former Member
      Former Member

      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.

      Author's profile photo Former Member
      Former Member

      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