Email template syntax

Hi,



What can be done in emails for personalization? I only find the syntax to put a contact field value: {leadfield=fieldname}.



Right now I would need a way to insert conditional text, based on the value of a field, or whether it has any value. My current case is the contact’s name - I want to greet them, but not all have the name on record, and I don’t want the first line to read “Greetings, ,”.



Also, are subject lines parsed?



Is it possible to include PHP somehow in templates?



Regards,

Xavier

Hi,

What can be done in emails for personalization? I only find the syntax to put a contact field value: {leadfield=fieldname}.

Right now I would need a way to insert conditional text, based on the value of a field, or whether it has any value. My current case is the contact’s name - I want to greet them, but not all have the name on record, and I don’t want the first line to read “Greetings, ,”.

Also, are subject lines parsed?

Is it possible to include PHP somehow in templates?

Regards,
Xavier

@xpaz can you share screen shot …have you gone trough email builder ?

Hi,

Thanks, I was looking in the docs, I had not seen the dynamic content in the email builder. It looks good, I will try it now.

I have also seen that subject lines do get parsed for contact fields.

The only remaining questions are, is it possible to include short conditional statements in templates, for small variations in wording? And it is possible to include PHP code? I.e. to capitalize or normalize fields, or to apply more complex logic.

Xavier

@xpaz what version your mautic?

v2.11.0

check my profile please