I hope my silly question will get answers from some of you...

I'm just trying to send an email using smarty basics functions such as using {php} tags and playing php in smarty tags {if strstr($email, '@')}.

But each time I try to send the template Smarty activate secure_mode and everything's ruined...

I found where Smarty put the secure_mode but I can't understand why... (in CRM/Core/Smarty.php line 202).

If someone ever run into this and solved it pleeeease help me :'(

PS : I defined this in my settings file => define( 'CIVICRM_MAIL_SMARTY', 1 );

Still working on it !

I hope i'll find the solution ;D

1 Answer 1


Allowing arbitrary php to be executed from an email string can potentially cause security issues from un-trusted users and hence the security mode of smarty is enabled for all string based resources.

I dont think there is an easy work-around for this :(

  • Thank's for your answer I will try with Smarty functions alone Apr 14, 2015 at 9:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.