I have created a Email Template and this template has to send to users. I am doing it through apex class. Users is receiving the mail I am using "Dear {!User.Name}". But it is coming with my name only. I want recipient user name like, "Dear {recipient user}" here. How to achieve this? please help!


I am assuming that you are doing this as 1 record to potentially different or multiple recipients each time. For that, you will need to change your email template to a Visualforce Template. In there, you can use {!Recipient.FirstName} as a value.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.