Set up email template in Identity Manager
- Karolin Hemmingsson (Unlicensed)
- Josefin Klang (Deactivated)
- Ylva Andersson
- Ann Base (Deactivated)
This article includes updates for Smart ID 23.04.
This article describes how to set up an email template in Identity Manager Admin.
In all fields, variables from data pools can be used. To use a variable, navigate to the data pool and variable name in the list to the left, and drag-and-drop it to the intended field. The mail body can be represented in plain text or in HTML format.
Prerequisites
- Install Identity Manager
- Available process to trigger emails to be sent
- If signed email shall be used, Sign and encrypt engine must be configured. For more information, see Sign and encrypt engine in Identity Manager.
Step-by-step instruction
Log in to Identity Manager Admin as an admin
user.
To add or edit an email template:
- Go to Home > Emails.
- To add a new email template, click +New. Enter details:
- Enter a Name, for example
EmailNewPassword
, and optionally a Description. - Enter an email address in the To field.
- Click Save+Edit.
- Enter a Name, for example
- To edit an existing email template, double-click the email template name.
To enable S/MIME encryption, the following applies:
- The process map requires a variable Certificate_CoreObjectDescriptorList containing a List<CoreObjectDescriptor> of CoreObjectDescriptors, pointing to Certificate CoreObjects. For more information, see Set up search configuration in Identity Manager.
The related certificate entities must be included as ASN.1 DER-encoded X509 certificates in the data column. Certificates created by Smart ID Identity Manager are by default encoded in ASN.1 DER format, automatically stored in the correct format as required here. PEM format is not supported.
Do the following:
In the fields CC, and BCC, enter one or more recipients, for example
${BaseDpEmployee_Email}
from theEmployee
datapool.For each recipient email provided in the To, CC, or BCC lists of the MailConfiguration, a S/MIME certificate must be provided which contains the email address(es) in the SAN RFC822 Name field. If there is an email address with no fitting S/MIME certificate, the mail task stops with an exception message.
- Enter a Subject.
- Select S/MIME Encryption if the email is to be encrypted.
Select Sign Email if the email is to be signed by the server.
For more information, see Secure email communication using S/MIME in Smart ID.
If you shall use signed emails, you must replace the email signing certificate, emailSignCert
. This is done in the file engineSignEncryptConfig.xml. For more information, see Sign and encrypt engine in Identity Manager.
- Open the file engineSignEncryptConfig.xml for editing.
Replace the email signing certificate file,
emailSigning.p12
, with the correct certificate file.Example: Snippet of engineSignEncryptConfig.xml.... <key name="emailSigningCert"> <type name="pkcs12" locationValue="classpath:emailSigning.p12" ....
By default, the email signing certificate is always validated before sending an email, so that the revocation of the certificate is taken into account as soon as possible. In some cases this is not desired, as it creates some amount of network traffic.
To turn off the certificate validation, do the following:
For WAR file deployment, add this to system.properties:
Turn off certificate validationemailSigner.validateSignatureCertificate=false
For docker deployment, edit the configuration file docker-compose.yml:
Turn off certificate validation- 'SYSTEM_PROPERTIES={ ... "emailSigner.validateSignatureCertificate": false }'
The html-formatted message is shown, when the mail server of the recipient supports html.
To enter an email message in HTML format:
- Go to the Html tab.
- Write an html-formatted email message in the text field. To insert a variable, for example
BaseDpEmployee_FirstName
, select the corresponding data pool in the left field and drag-and-drop the variable into the text field.
The plain text message is a fallback solution for when the mail server of the recipient does not support html.
To enter an email message in plain text:
- Go to the Text tab.
- Write an email message in the text field. To insert a variable, for example
BaseDpEmployee_FirstName
, select the corresponding data pool in the left field and drag-and-drop the variable into the text field.
The contents to attach to an email must be in binary form in a data pool. Typical examples of binary data are photos and signatures.
To add an attachment:
- Go to the Attachments tab.
- Navigate to the data pool and field in the list on the left, and drag-and-drop it to the table in the Attachments tab.
- If you want, edit MIME type, to attach the file in a different format.
- If you want, edit the Name of the attachment.
- Click Save.
To edit the SMTP settings:
- In the Test area field, click on the Expand symbol on the top. On the SMTP Settings tab, the settings are shown.
- To edit the settings, click on the SMTP Settings button.
Enter the SMTP server settings. Click OK to save.
Example: SMTP settingsHost: localhost
Port: 25
User:
Password:
Default sender: activiti@localhost
Timeout: 5000
Connection security: NONE
Check server identity: false- Go to the Preview tab to view all variable expressions.
- If you want, Send test mail to the Test Recipient entered in the SMTP Settings.
You can use four different functions for formatting date fields in an email template.
To format date fields in an email template, do the following:
- In the Test area field, select the Date Formatting tab to view examples and details.
- Enter the date function in the Text or Html tab.
Conversion examples
Sample Field | Defined Value | Expression | Output |
---|---|---|---|
Person_Birthdate | 01.01.1985 | ${Person_BirthDate} | 1985-01-01T00:00:00.000+01:00 |
Type | Description | Sample Function | Sample Output |
Simple Formatted | Simple formatted | ${Date:formatDate(Person_BirthDate,"dd-MM-yyyy")} | 01-01-1985 |
Formatting with Locale | Formatted with German Locale | ${Date:formatDateWithLocale(Person_BirthDate,"dd MMM yyyy","de-DE")} | 01 Jan. 1985 |
Formatting with Locale | Formatted with French Locale | ${Date:formatDateWithLocale(Person_BirthDate,"dd MMM yyyy","fr-FR")} | 01 janv. 1985 |
Formatting with Time Zone | Formatted with time zone of GMT-8 | ${Date:formatDateWithTimezone(Person_BirthDate,"dd-MM-yyyy HH:mm:ss z","GMT-8:00")} | 31-12-1984 15:00:00 GMT-08:00 |
Formatting with Time Zone and Locale | Formatted with time zone of GMT-8 and German Locale | ${Date:formatDateWithTimezoneAndLocale(Person_BirthDate,"dd MMM yyyy HH:mm:ss z","GMT-8:00","de-DE")} | 31 Dez. 1984 15:00:00 GMT-08:00 |
Formatting with Time Zone and Locale | Formatted with time zone of GMT-8 and French Locale | ${Date:formatDateWithTimezoneAndLocale(Person_BirthDate,"dd MMM yyyy HH:mm:ss z","GMT-8:00","fr-FR")} | 31 déc. 1984 15:00:00 GMT-08:00 |
Related information
Copyright 2024 Technology Nexus Secured Business Solutions AB. All rights reserved.
Contact Nexus | https://www.nexusgroup.com | Disclaimer | Terms & Conditions