CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Enable Smarty in CiviMail causes Error 500 on Send Test Mail
Pages: [1]

Author Topic: Enable Smarty in CiviMail causes Error 500 on Send Test Mail  (Read 538 times)

shayaknyc

  • I post occasionally
  • **
  • Posts: 74
  • Karma: 0
Enable Smarty in CiviMail causes Error 500 on Send Test Mail
September 06, 2012, 10:38:02 am
Using Civi 4.1.3 on Drupal 7. Went into civicrm.settings.php and enabled smarty: define( 'CIVICRM_MAIL_SMARTY', 1 );

In the email, included the following smarty code:
{if {contact.first_name} eq ''}Dear Friend,{else}Dear {contact.first_name},{/if}

The preview shows correctly. I enter an email address with no first name that's in the database and click the Send Test Mail button, and then I get an Error 500 Internal Server Error. If I disable smarty in civimail, the send test works, but then doesn't parse the smarty if logic.

Any ideas?

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Support »
  • Using CiviCRM »
  • Using CiviMail (Moderator: Piotr Szotkowski) »
  • Enable Smarty in CiviMail causes Error 500 on Send Test Mail

This forum was archived on 2017-11-26.