Skip to Content
0

I have creating an email notification and I need to send the Data into table in the message body

Jun 23, 2017 at 12:13 PM

101

avatar image

Hi NWDS BPM Experts,

I'm creating an email notification and I need to send a table in the message body.

I want sent a email notification above table format,till now we are sending normal text.No idea how creating the table.

Please help on this

Thanks

table.png (2.3 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

kumar p Jun 23, 2017 at 02:30 PM
0

Hello Evgeniy,

I can use directly HTML tags in the email notification body then user get the notification email at the time it is automatically change to Table.

could you please give an example.

Regards,

Kumar

Share
10 |10000 characters needed characters left characters exceeded
Evgeniy Kolmakov Jun 23, 2017 at 12:22 PM
0

Hi Kumar!

You could use XSLT transformation to build HTML page with table and use that HTML as message body.

Regards, Evgeniy.

Share
10 |10000 characters needed characters left characters exceeded
Evgeniy Kolmakov Jul 10, 2017 at 12:47 PM
0

Hi Kumar!

This template builds HTML page. And your e-mail client should be able to process HTML messages not only the plain text.

I use Scenario 3 from this blog:

https://blogs.sap.com/2016/03/10/stop-using-mail-package-simplify-your-mail-receiver-adapter-scenarios/

with the following settings:

Regards, Evgeniy.


html-mail.png (9.3 kB)
Share
10 |10000 characters needed characters left characters exceeded
Evgeniy Kolmakov Jul 10, 2017 at 11:32 AM
0

Hi Kumar!

Here is example of XSL template I used to generate email error report to dedicated person:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<xsl:output method="html" indent="yes" version="4.0"/>
<xsl:template match="/*">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<style>
*, *:after, *:before {
box-sizing: border-box;
}
h1 {
margin: 1em 0 0.5em 0;
font-weight: normal;
position: relative;
text-shadow: 0 -1px rgba(0,0,0,0.6);
font-size: 24px;
line-height: 40px;
background: #355681;
background: rgba(53,86,129, 0.8);
border: 1px solid #fff;
padding: 5px 15px;
color: white;
border-radius: 0 10px 0 10px;
box-shadow: inset 0 0 5px rgba(53,86,129, 0.5);
font-family: "Muli", sans-serif;
}
h2 {
margin: 1em 0 0.5em 0;
color: #343434;
font-weight: normal;
font-size: 18px;
line-height: 40px;
font-family: 'Orienta', sans-serif;
}
#documents {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
#documents th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background: #355681;
background: rgba(53,86,129, 0.8);
color: white;
}
#documents td, #documents th {
border: 1px solid #ddd;
padding: 8px;
}
</style>
</head>
<body>
<h1>
<xsl:choose>
<xsl:when test="//FaultDocuments/@reporttitle">
<xsl:value-of select="//FaultDocuments/@reporttitle"/>
</xsl:when>
<xsl:otherwise>
Documents processing report
</xsl:otherwise>
</xsl:choose>
</h1>
<h2>The following fault documents were found during processing:</h2>
<p/>
<table id="documents">
<tr>
<th>File name</th>
<th>Creation date</th>
<th>Error description</th>
</tr>
<xsl:apply-templates select="//FaultDocument"/>
</table>
<p/>
<p>This message was generated automatically. Don't respond to it.</p>
</body>
</html>
</xsl:template>
<xsl:template match="FaultDocument">
<tr xmlns="http://www.w3.org/1999/xhtml">
<td><xsl:value-of select="PDFFileName"/></td>
<td><xsl:value-of select="ScanDate"/></td>
<td><xsl:value-of select="FaultReason"/></td>
</tr>
</xsl:template>
<xsl:template name="lineFeed"><xsl:text> </xsl:text></xsl:template>
</xsl:stylesheet>

Regards, Evgeniy.

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi,

I also tried this but not working , getting plain text only, do we need to set somthing

Regads

GB

0

Gagan ,

I believe you need to set content type as text/html in receiver mail via MTB.

Br,

Manoj

1