# EmailTemplate - Variable for email signature

**URL:** <https://developer.sailpoint.com/discuss/t/emailtemplate-variable-for-email-signature/63535>\
**Category:** IIQ Discussion and Questions\
**Tags:** email-templates, identityiq\
**Created:** [June 6, 2024, 2:05pm UTC](https://developer.sailpoint.com/discuss/t/emailtemplate-variable-for-email-signature/63535 "2024-06-06T14:05:33Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![RIsidoro](https://avatars.discourse-cdn.com/v4/letter/r/a6a055/32.png) [@RIsidoro](https://developer.sailpoint.com/discuss/u/RIsidoro)\
**Post date:** [June 6, 2024, 2:05pm UTC](https://developer.sailpoint.com/discuss/t/emailtemplate-variable-for-email-signature/63535/1 "2024-06-06T14:05:33Z")

</div>

### Which IIQ version are you inquiring about?

Version 8.2

### Share all details related to your problem, including any error messages you may have received.

hello all  
I’m working on email templates.

I would like the emails to all have the same signature, something like  
“Thank you, best regards”

but I have several different templates and the signature may change.

I would like to have the signature in a variable on a specific location and I wanted all emails to get this signature. Is it possible? to add this in a variable and put that variable in the emails ?

Thank you all

---

<div class="post-metadata">

**Author:** ![ashutosh08](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/ashutosh08/32/11459_2.png) [@ashutosh08](https://developer.sailpoint.com/discuss/u/ashutosh08)\
**Post date:** [June 6, 2024, 2:14pm UTC](https://developer.sailpoint.com/discuss/t/emailtemplate-variable-for-email-signature/63535/2 "2024-06-06T14:14:25Z")

</div>

Hi @RIsidoro,

If it is fixed text that you want to place as signature, then you can place in some property file and then with variable substitution you can populate in all templates with change in details of property file.

But if the use case is about dynamic insertion of some HTML content, then it has been discontinued by SailPoint for security reason.

Let me know if further input/help is needed.

Thanks

---

<div class="post-metadata">

**Author:** ![RIsidoro](https://avatars.discourse-cdn.com/v4/letter/r/a6a055/32.png) [@RIsidoro](https://developer.sailpoint.com/discuss/u/RIsidoro)\
**Post date:** [June 6, 2024, 2:31pm UTC](https://developer.sailpoint.com/discuss/t/emailtemplate-variable-for-email-signature/63535/3 "2024-06-06T14:31:22Z")

</div>

Hello @ashutosh08  
It was supposed to be both cases, but if I could at least do it flor plain text, that would be very good.

How Can I do it ? put the text in variable in a property file and then use in email template

Thank you

---

<div class="post-metadata">

**Author:** ![ashutosh08](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/ashutosh08/32/11459_2.png) [@ashutosh08](https://developer.sailpoint.com/discuss/u/ashutosh08)\
**Post date:** [June 6, 2024, 2:51pm UTC](https://developer.sailpoint.com/discuss/t/emailtemplate-variable-for-email-signature/63535/4 "2024-06-06T14:51:26Z")

</div>

Hi @RIsidoro,

In simplest way you can use your build process for variable substitution. Please check below link which have SSB deployment steps and in this you will get you variable substitution example also.

[https://community.sailpoint.com/t5/Services-Standard-Deployment/Services-Standard-Build-User-Guide-SSB/ta-p/73434](https://community.sailpoint.com/t5/Services-Standard-Deployment/Services-Standard-Build-User-Guide-SSB/ta-p/73434)

Let me know if you have further question.

Thanks

---

<div class="post-metadata">

**Author:** ![RIsidoro](https://avatars.discourse-cdn.com/v4/letter/r/a6a055/32.png) [@RIsidoro](https://developer.sailpoint.com/discuss/u/RIsidoro)\
**Post date:** [June 6, 2024, 3:41pm UTC](https://developer.sailpoint.com/discuss/t/emailtemplate-variable-for-email-signature/63535/5 "2024-06-06T15:41:28Z")

</div>

Is it possible do something like this

`#set(Custom mappingObj = context.getObjectByName(Custom.class, "Custom_signature")`

and then some how use mappingObj to get the value of some key ?

---

<div class="post-metadata">

**Author:** ![vishal\_kejriwal1](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/vishal_kejriwal1/32/10904_2.png) [@vishal\_kejriwal1](https://developer.sailpoint.com/discuss/u/vishal_kejriwal1)\
**Post date:** [June 6, 2024, 4:40pm UTC](https://developer.sailpoint.com/discuss/t/emailtemplate-variable-for-email-signature/63535/6 "2024-06-06T16:40:10Z")

</div>

> [@RIsidoro](#):
>
> #set(Custom mappingObj = context.getObjectByName(Custom.class, “Custom\_signature”)

Yes but this code need to be added to all the Template , but here good thing is you need to modify only in custom object in case you need to update signature .

---

<div class="post-metadata">

**Author:** ![ashutosh08](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/ashutosh08/32/11459_2.png) [@ashutosh08](https://developer.sailpoint.com/discuss/u/ashutosh08)\
**Post date:** [June 6, 2024, 4:42pm UTC](https://developer.sailpoint.com/discuss/t/emailtemplate-variable-for-email-signature/63535/7 "2024-06-06T16:42:16Z")

</div>

Yes, you can use velocity for details insertion from custom, but HTML tag you will not be able to do.

Please use below sample code that contain a string in custom. Let me know if further help needed.

```auto
#set($ctx = $spTools.class.forName("sailpoint.api.SailPointFactory").getMethod("getFactory", null).invoke(null,null).getCurrentContext())
    
    
#set($customClass = $spTools.class.forName("sailpoint.object.Custom"))

#set($mappingObj = $ctx.getObjectByName($customClass, "Custom_Mail"))

$mappingObj.attributes.Email_Template_Text

```

**Sample Custom**

```auto
<Custom name="Custom_Mail">
  <Attributes>
    <Map>
      <entry key="Email_Template_Text" value="Value that should be inserted."/>
    </Map>
  </Attributes>
</Custom>

```

Thanks

---

<div class="post-metadata">

**Author:** ![pravin\_ranjan](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/pravin_ranjan/32/6771_2.png) [@pravin\_ranjan](https://developer.sailpoint.com/discuss/u/pravin_ranjan)\
**Post date:** [June 6, 2024, 7:40pm UTC](https://developer.sailpoint.com/discuss/t/emailtemplate-variable-for-email-signature/63535/8 "2024-06-06T19:40:06Z")

</div>

@RIsidoro

One more option you can try,  
a. Create a MessageTemplate named “Signature Message Template” that contains your signature text with HTML syntax

b. In your email template you can use by below line

at the top of body

`#set($spctx = $spTools.class.forName("sailpoint.api.SailPointFactory").getMethod("getFactory", null).invoke(null,null).getCurrentContext())`

At the location where you want to add Signature

`$spctx.getObjectByName($spTools.class.forName("sailpoint.object.MessageTemplate"), "Signature Message Template").getText();`

---

<div class="post-metadata">

**Author:** ![RIsidoro](https://avatars.discourse-cdn.com/v4/letter/r/a6a055/32.png) [@RIsidoro](https://developer.sailpoint.com/discuss/u/RIsidoro)\
**Post date:** [June 7, 2024, 7:31am UTC](https://developer.sailpoint.com/discuss/t/emailtemplate-variable-for-email-signature/63535/9 "2024-06-07T07:31:42Z")

</div>

Hello Thank you all for your help  
With your code spinets I was able to do it

---

<div class="post-metadata">

**Author:** ![system](https://global.discourse-cdn.com/sailpoint/original/2X/f/f2136700ed5e3703e0b85e02f6be799dacca7735.png) [@system](https://developer.sailpoint.com/discuss/u/system)\
**Post date:** [August 6, 2024, 7:32am UTC](https://developer.sailpoint.com/discuss/t/emailtemplate-variable-for-email-signature/63535/10 "2024-08-06T07:32:41Z")

</div>

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