HTML Email Failing To Send

Which IIQ version are you inquiring about?

8.3

Please share any other relevant files that may be required (for example, logs).

EmailTemplate-LcmUserNotification.xml (5.2 KB)

Share all details about your problem, including any error messages you may have received.

We are getting the error below when trying to send email with the attached template:

2024-09-16 14:27:36,149 INFO [stdout] (Thread-260) 2024-09-16T14:27:36,149 WARN Thread-260 sailpoint.request.RequestHandler:209 - sailpoint.request.RequestPermanentException: Unable to send email notification, a to address was not specified
2024-09-16 14:27:36,149 INFO [stdout] (Thread-260) at deployment.identityiq.war//sailpoint.request.EmailRequestExecutor.execute(EmailRequestExecutor.java:87)

Hi @jsgentry1,

in your WF are setting to argument? Like this:

<Step action="call:sendEmail" condition="script:Util.csvToList(notificationScheme).contains(&quot;user&quot;)" icon="Email" name="Notify User" posX="98" posY="10">
    <Arg name="template" value="ref:userEmailTemplate"/>
    <Arg name="to" value="script:getUserEmail(identityName, plan)"/>
    <Arg name="approvalSet" value="call:prepareApprovalSetForNotification"/>
    <Transition to="Notify Requester"/>
  </Step>

Hi @jsgentry1,

Add to arg in workflow sendEmail step. You can write a script tp send an email to requester or requester manager. Please refer the below script.

  <Arg name="to">
      <Script>
        <Source>
          <![CDATA[
     import sailpoint.object.Identity;
          
      Identity requesterIdentity = context.getObjectByName(Identity.class, identityName);	  
	  Identity manageridentity = requesterIdentity.getManager();
      if(null != requesterIdentity)
				return requesterIdentity.getStringAttribute("email");		 // send email to requester

/*
if(null != manageridentity)
				return manageridentity.getStringAttribute("email");	    //send email to requester manager
*/				
      else
         return "[email protected]";   //default email 
         ]]></Source>
      </Script>
    </Arg>

Regards,
Arun

I don’t believe the Workflow is the problem. The default e-mail message comes across fine; it’s only when I try to use HTML that the problem occurs.

As you can see from the filename of the template I attached, we are trying to add HTML to the LCM User Notification message. Could you tell me if the template is wrong? If so, how?

In CDATA sections, you can use && instead of &amp;&amp; to represent the ampersand character (&).

Also, you can test the EmailTemplate using rule. Please test the emailTemplate and post, if you get any error message.

1 Like

Replacing the &amp;s did the trick! Thank you so much!

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.