Skip to Content
avatar image
Former Member

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

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)
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

4 Answers

  • avatar image
    Former Member
    Jun 23, 2017 at 02:30 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Jun 23, 2017 at 12:22 PM

    Hi Kumar!

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

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 10, 2017 at 12:47 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:

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

    with the following settings:

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

  • Jul 10, 2017 at 11:32 AM

    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.

    Add comment
    10|10000 characters needed characters exceeded