Highlighted
Super Contributor.
Super Contributor.
390 views

dynamic content in email template for Notification

Jump to solution

Hi,

I have been trying to send dynamic HTML email content

<table> <tr> <td><span style="font-weight:bold;"><br>SRAccount1</br></span></td> </tr> <tr> <td>- Creation Date:</td> </tr> <tr> <td>- Last Attestation Date:</td> </tr> <tr> <td><span style="font-weight:bold;"><br>SRAccount1</br></span></td> </tr> <tr> <td>- Creation Date:</td> </tr> <tr> <td>- Last Attestation Date:</td> </tr> <table>

Event tried using <use-html> tag but no luck. If some has please share me with policy code It will be really helpful

Labels (2)
0 Likes
1 Solution

Accepted Solutions
Highlighted
Outstanding Contributor.
Outstanding Contributor.

Hi.

(you forgot to hide some information with red)

Is this null pointer exception related to the <use-html> tag? So if you remove <use-html> it sends the email but without using the html?

I have not validated the HTML itself, but does it make a difference if you do some very simple HTML test or even just plain text in <use-html>, like <use-html>hello world</use-html>?

What version of IDM?

Best regards

Marcus

View solution in original post

0 Likes
5 Replies
Highlighted
Outstanding Contributor.
Outstanding Contributor.

Hi.

The <use-html> tag should do it. Are you using send email from template? What version of IDM?

This is what I use, and it works. The local variable rows contains HTML.

<do-send-email-from-template notification-dn="Security\Default Notification Collection" template-dn="security\Default Notification Collection\Our Custom Template">
	<arg-string name="to">
		<token-local-variable name="recipient"/>
	</arg-string>
	<arg-string name="encoding">
		<token-text xml:space="preserve">UTF-8</token-text>
	</arg-string>
	<arg-string name="rows">
		<token-text xml:space="preserve">&lt;use-html></token-text>
		<token-local-variable name="rows"/>
		<token-text xml:space="preserve">&lt;/use-html></token-text>
	</arg-string>
</do-send-email-from-template>

Best regards

Marcus

0 Likes
Highlighted
Super Contributor.
Super Contributor.

 

Attached a image . This is the error Im facing

0 Likes
Highlighted
Outstanding Contributor.
Outstanding Contributor.

Hi.

(you forgot to hide some information with red)

Is this null pointer exception related to the <use-html> tag? So if you remove <use-html> it sends the email but without using the html?

I have not validated the HTML itself, but does it make a difference if you do some very simple HTML test or even just plain text in <use-html>, like <use-html>hello world</use-html>?

What version of IDM?

Best regards

Marcus

View solution in original post

0 Likes
Highlighted
Knowledge Partner
Knowledge Partner

There is a patch in 4.8.1 for a missing notfSMTPtimeout attribute value on the default notification collection object.

0 Likes
Highlighted
Super Contributor.
Super Contributor.
Thanks Marcus,

It worked it was some validation issue
0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.