I need to compose an email body and have user name password atributes to be added of every user to it. For now i have the html content in a string and im trying to have string formatter to replace the user name and password for the respective user. How ever I am having trouble having the html content in a single string and also get the mapping of diferent users to be changed accordingly.
code snipet
String regEmailBody =
"<div>
+ "successfully registered for the system. <br>Your username "
+ "is[@email_placeholder].<br>Your temporary password is <b>"
+ "@sysGeneratedPW_placeholder!</b><br>Please login to the system to reset your password, "
+ "click on the button below.<br></p></div>";
regEmailBody.replaceFirst("@name_placeholder", name);
regEmailBody.replaceAll("@userEmail", emailAdd);