Which IIQ version are you inquiring about?
Tested on versions 8.3p1 and 8.4p2.
Please share any images or screenshots, if relevant.
Email processed correctly:
Email processed incorrectly:
Share all details about your problem, including any error messages you may have received.
Hi experts!
We’re encountering an issue when sending emails via HTTP/OAuth. Our EmailTemplates include UTF‑8 characters that must be rendered correctly. Previously we used SMPT/Basic, but now we need to switch to HTTP/OAuth.
When we run the exact same test -using the same EmailTemplate but changing only the method- the UTF‑8 characters are replaced by the replacement character “�” (see attached screenshots).
Rule code used for the test:
import sailpoint.object.EmailTemplate;
import sailpoint.object.EmailOptions;
import org.apache.log4j.Logger;
import org.apache.log4j.Level;
Logger log = Logger.getLogger("Aux-Rule-SendTestEmail");
log.setLevel(Level.DEBUG);
log.debug("Entering Aux-Rule-SendTestEmail");
// Parameters
String identity_name = "ABCD1234";
String template = "Aux-EmailTemplate-TestUTF-8";
String to_addresses = "{my email address}";
EmailTemplate emailTemplate = context.getObject(EmailTemplate.class, template);
if (emailTemplate != null) {
Map args = new HashMap();
args.put("identityName", identity_name);
EmailOptions emailOptions = new EmailOptions();
emailOptions.setTo(to_addresses);
emailOptions.setVariables(args);
log.debug("Before sending email");
context.sendEmailNotification(emailTemplate, emailOptions);
}
log.debug("Email sent!");
return "Sent!";
EmailTemplate definition:
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE EmailTemplate PUBLIC "sailpoint.dtd" "sailpoint.dtd">
<EmailTemplate name="Aux-EmailTemplate-TestUTF-8">
<Body>
#set($ctx = $spTools.class.forName("sailpoint.api.SailPointFactory").getMethod("getFactory", null).invoke(null,null).getCurrentContext())
#set($identity = $ctx.getObjectByName($spTools.class.forName("sailpoint.object.Identity"), $identityName))
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="x-apple-disable-message-reformatting">
</head>
<body>
<div style="font-family: Arial, sans-serif; font-size:14px; padding-bottom:10px; border-bottom:10px solid #000; margin-top:10px">
<div style="border-bottom:3px solid #000; border-top:1px solid #000; text-align:center;">
<h1 style="color:#000; font-size:20px; line-height:25px; text-transform:uppercase; ">
TEST UTF-8
</h1>
</div>
<p style="line-height:18px; text-align:justify">
Hello world! ñ á é í ó ú ü
<br/>
Identity Name: $identityName
</p>
</div>
</body>
</html>
</Body>
<Description>
Email template for testing
</Description>
<Signature>
<Inputs>
<Argument name="identityName" type="string">
<Description>The full name user.</Description>
</Argument>
</Inputs>
</Signature>
<Subject>TEST UTF-8</Subject>
</EmailTemplate>
Thanks in advance for your help!