Hi,
We have an object class called Billing with property Text, and we use the action Send Email to send Billing.Text (as plain text). Billing.Text is a function with several parameters, and we have formatted it so that it looks good in an email.
We have now discovered that the recipient of the emails needs to be able to format the text in the email they receive in Outlook, but that is not possible. When we try to send it as HTML in the Send Email action, we lose all the formatting we have made in Billing.Text.
When working with HTML email, you need to also provide a HTML template. This can be generated with tools like MJML. Without an HTML template, your text will be sent as-is, with no formatting.
Remember to also provide a plaintext version of the email as a fallback, in case the recipient has turned off HTML email or their client does not support it.
Additionally, you can add text from function params with squiggly brackets or by constructing a template string with JS.
The parameters surrounded by {{double braces}} will be automatically populated by Appfarm when an email is sent. Link
You can read more about plaintext and HTML mail in our docs at this link
Please reach out if this does not solve your problem, or something else is unclear.
I created a text in mjml.io, clicked “View HTML” and copied the code. Do I now just paste the code into the function in Appfarm? Where do I put the return and the quote signs?
In the plain text I have many statements like this: (myProperty ? myProperty : 0) , because I don’t know if the parameters have value or not. Can I do that in HTML as well?