and more in a single search tool across platforms. Read the announcement here. |
03/28/2024 04:14 AM
Hi All,
Unable to add $ symbol in email template. We are trying to send email with the body like mentioned below.
Hello ${user.username}
You are required to login with initial password, to create a password please follow the below steps.
$First 2 letter of firstnameFirst 2 letter of last name4 digit of birth year!
Example: Name - John Smith
4 digit of birth year - 1979
$JoSm1979!
It is giving blank content in email body whenever receive email. If i remove $ in email it is working fine.
Please help me how we can add $ symbol in email template. Also need to do know $ symbol is allowed in email templates or not.
I have tried adding with single quotes and double quotes, but still throwing blank content.
We are receiving only true in email body when we use $ symbol.
Regards
Ashwini KM
.
Solved! Go to Solution.
03/28/2024 04:38 AM
it work, we are printing via cp value, can you share email body logic for printing above condition,
03/28/2024 05:28 AM
It seems like the dollar sign "$" is being interpreted as part of a template variable, causing unexpected behavior in your email template. To include the dollar sign as a literal character in your email template, you can try escaping it using a backslash "\".
Here's how you can modify your email template to include the dollar sign:
Hello ${user.username}
You are required to login with an initial password. To create a password, please follow the below steps:
\$First 2 letters of the firstname\$First 2 letters of the last name\$4 digits of the birth year!
Example: Name - John Smith
4 digits of birth year - 1979
\$JoSm1979!
By adding a backslash before the dollar sign "\$", you are indicating to the email template system that you want to treat the dollar sign as a literal character and not as part of a template variable.
Make sure to test this modification to ensure it works as expected in your email template system.