Sign in to Community
Sign in to view all badges
In a delivery template, in the text version, we use this code to retrieve the subject dynamically:
<% document.write(delivery.mailParameters.subject); %>
For instance, if the subject is : <%=recipient.firstName%>, how are you doing?
It won't execute the firstname variable and will display the all thing as plain text.
Is there any means for avoing this issue?
Thank you very much for your help!
If you use a typologie rule which consider the content of your delivery text content, you will able to add your script in this content.
//script in your rule
var txtStr = delivery.content.text.source;
delivery.content.text.source = '<% document.write(delivery.mailParameters.subject); %>' + txtStr;
This answer can help you ?