emailTemplate language determination

This topic has 1 reply, 2 voices, and was last updated 1 month, 1 week ago by [email protected].

  • Author
    Posts
  • #28349
     vliefooghe
    Participant

    Hello,

    I see that in IDM 7 we can use emailTemplates, at least in Self-Service.

    I also discovered (in bin/defaults/script/onCreateUser.js) that we could use a template with the function openidm.action("external/email", "sendTemplate", params);

    I was wondering how, in this case, we can determine which language is used for the template, assuming that we can define several language codes in such template.

    Is this part of the params object ?

    I was not able to find any documentation on this action…

    Thank you,

    • This topic was modified 3 months, 3 weeks ago by vliefooghe.
    #28430

    I have been using these for sending notification via a workflow.

    You need to create the a new template (emailTemplate-rejectRegistration.json) — I usually make a copy of conf/emailTemplate-welcome.json and edit it.

    The template looks like this. My example contains an html formatted message.

    {
        "enabled" : true,
        "from" : "[email protected]",
        "subject" : {
            "en" : "Your registration request for Data."
        },
        "message" : {
            "en" : "<html><body><div><p>This registration request is for a {{object.userType}} account for Access by {{object.authorizerFullName}} has been rejected for the following reason.</p><br/><p>{{object.reason}}</p><br/><br/><p>If you have any questions or issues, please contact your Data Coordinator for help.</p><br/></div></body></html>"
        },
        "defaultLocale" : "en",
        "mimeType" : "text/html"
    }

    In the message you have access to the object passed via the prams object in which you can display in the email.

    V/r,
    Gene

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

©2021 ForgeRock - we provide an identity and access platform to secure every online relationship for the enterprise market, educational sector and even entire countries. Click to view our privacy policy and terms of use.

Log in with your credentials

Forgot your details?