Hi - I’ve run into a curious behaviour when trying to send email using PHP Mail and ExpressionEngine. Perhaps I don’t quite understand the parse order correctly, or it’s a bug. I encounter it when trying to use if statements.
When I try to run this code,
$message = '{exp:zoo_visitor:details limit="1" dynamic="no"}' .
'{if member_headline}<h2 class="h2">{member_headline}</h2>{/if}' .
'{/exp:zoo_visitor:details}';The email I receive looks like this:
{if "This is the headline"}
This is the headline
{/if}
The strange thing is if I try to just visit the page and echo the $message variable, the if statements are parsed properly, and all I see is:
This is the headline
I have PHP enabled in the template and it is set to parse on output.
Any ideas on what I can be doing wrong? Or if it’s a bug, or a limitation of using PHP Mail with ExpressionEngine?
Carlos
(EE 2.3.1)