how to insert html code in email notifcation

Manoj Jain1
Giga Contributor

I want to insert following code in email notification how do i achieve that

<html>

<body>

<table style="width:100%">

  <tr>

      <td>Jill</td>

      <td>Smith</td>

      <td>50</td>

  </tr>

  <tr>

      <td>Eve</td>

      <td>Jackson</td>

      <td>94</td>

  </tr>

  <tr>

      <td>John</td>

      <td>Doe</td>

      <td>80</td>

  </tr>

</table>

</body>

</html>

3 REPLIES 3

Chuck Tomasi
Tera Patron

Hi Raj,



Ensure your notification is set to Rich HTML format for best results. From there, you can just enter the HTML like you have displayed (less the body & html tags)



Email Notifications - ServiceNow Wiki


Anurag Tripathi
Mega Patron
Mega Patron

You can use the message_html part under the email-> notification, 'what will it contain' tab


-Anurag

Deepak Ingale1
Mega Sage

Hi,



There are couple of ways you can do with



1)On to the email template, there is an icon like <>


for source code. You can put your code there.



2) You can use template.print() in email scipts and put your tag in print method