I am developing a feature to send a email from a Custom Visualforce page. For this I am using the Messaging.SingleEmailMessage class.
I need to give users, the option to select email templates from a set of email templates in the Salesforce 'Email template'.
However i cannot find a way to preview emails which will be sent. My email templates will have data mapped from the respective record. How can i solve this problem of previewing the email templates with the values from email templates?