Answers.Body: <p>Yes, what you are describing is the default setting for CiviCRM.</p>
  
  <p>Only Message Templates and Automated Messages make use of the so called smarty template engine. The smarty template engines makes "if"-statements possible.
  The reason for this is that these Templates and Automated Messages are for more experienced users and administrators. </p>
  
  <p>Normal mails, mailings and pdf reports can be used by regular CiviCRM users. And it might make their daily work much more difficult if they suddenly run into smarty template coding.</p>
  
  <p>But, this is only the default setting.
  In your civicrm.settings.php is an option to override this and expose the smarty template engine to normal email too:</p>
  
  <pre><code>/**
   * Enable this constant, if you want to send your email through the smarty
   * templating engine(allows you to do conditional and more complex logic)
   *
   */
  define( 'CIVICRM_MAIL_SMARTY', 0 );
  </code></pre>
  
  <p>Set this to 1 and you can use "if"-statements in normal email.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-14T22:14:01.350Z
Answers.Text: Totally makes sense that you could turn this on and off. Thanks for letting me know this was an easy fix!  I'm now running across a parse error where it keeps adding an unexpected & in the php that ends up running the if statement. Trying to work through that now....
Answers.UserDisplayName: RayWright
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2016-01-14T19:48:19.937Z
Answers.LastActivityDate: 2016-01-14T19:48:19.937Z
Answers.UserDisplayName: Catorghans
Body: <p>Do conditional statements with tokens not work when you manually send an email or 'print' a thank you letter? I have a bunch set up inside the auto generated emails for contribution receipts or event registrations but when I add a statement to a message template - and send it out using 'actions - send email to contacts' or 'actions - thank you letters for contributions' the if statement is ignored.</p>
  
  <p>(I'm in Wordpress 4.3.2 and Civi 4.6.4) </p>
  
Tags: <message-templates><receipts>
Title: Conditional statements in 'manual' emails or thank you letters
ThreadText: # Conditional statements in 'manual' emails or thank you letters
  
  (Asked by: username_0 on 2016-01-14)
  
  Do conditional statements with tokens not work when you manually send an email or 'print' a thank you letter? I have a bunch set up inside the auto generated emails for contribution receipts or event registrations but when I add a statement to a message template - and send it out using 'actions - send email to contacts' or 'actions - thank you letters for contributions' the if statement is ignored.
  
  (I'm in Wordpress 4.3.2 and Civi 4.6.4)
  
  **Tags:** message-templates, receipts
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2016-01-14. Score: 4 | Accepted answer
  
  Yes, what you are describing is the default setting for CiviCRM.
  
  Only Message Templates and Automated Messages make use of the so called smarty template engine. The smarty template engines makes "if"-statements possible.
  The reason for this is that these Templates and Automated Messages are for more experienced users and administrators.
  
  Normal mails, mailings and pdf reports can be used by regular CiviCRM users. And it might make their daily work much more difficult if they suddenly run into smarty template coding.
  
  But, this is only the default setting.
  In your civicrm.settings.php is an option to override this and expose the smarty template engine to normal email too:
  
  ```
  /**
   * Enable this constant, if you want to send your email through the smarty
   * templating engine(allows you to do conditional and more complex logic)
   *
   */
  define( 'CIVICRM_MAIL_SMARTY', 0 );
  
  ```
  
  Set this to 1 and you can use "if"-statements in normal email.
  
  > **Comments:**
  > **username_0**: Totally makes sense that you could turn this on and off. Thanks for letting me know this was an easy fix!  I'm now running across a parse error where it keeps adding an unexpected & in the php that ends up running the if statement. Trying to work through that now....  
  
  ---
  
  