on 06-23-2017 1:13 PM
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:
with the following settings:
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Gagan ,
I believe you need to set content type as text/html in receiver mail via MTB.
Br,
Manoj
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kumar!
You could use XSLT transformation to build HTML page with table and use that HTML as message body.
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.