# Using an If statement in an email template

**URL:** <https://developer.sailpoint.com/discuss/t/using-an-if-statement-in-an-email-template/4251>\
**Category:** SHF Discussion and Questions\
**Created:** [May 16, 2022, 9:38pm UTC](https://developer.sailpoint.com/discuss/t/using-an-if-statement-in-an-email-template/4251 "2022-05-16T21:38:05Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![colin\_mckibben](https://sea1.discourse-cdn.com/sailpoint/discuss/user_avatar/developer.sailpoint.com/colin_mckibben/32/37182_2.png) [@colin\_mckibben](https://developer.sailpoint.com/discuss/u/colin_mckibben)\
**Post date:** [May 23, 2022, 7:06pm UTC](https://developer.sailpoint.com/discuss/t/using-an-if-statement-in-an-email-template/4251/6 "2022-05-23T19:06:38Z")

</div>

According to the [Apache Velocity Template specification](https://velocity.apache.org/engine/2.0/user-guide.html#if-elseif-else), you shouldn’t need the curly braces when using variables in your if/else. I was able to successfully apply an if statement in the subject line, which you can find [in this topic](https://developer.sailpoint.com/discuss/t/email-templating-and-conditional-routing/3540/5).

Maybe try this:

```nohighlight
The value of "user.band" is ${user.band}

#if( $user.band == '700')Success#{else}Fail#end

```

---

_[View the full topic](https://developer.sailpoint.com/discuss/t/using-an-if-statement-in-an-email-template/4251)._
