+ Start a Discussion
Dinesh AnnapareddyDinesh Annapareddy 

Apex Email Preview ?

I wanted a custom Email send using Visual force page. End user picks the Template and Recepient .
How should i give preview of the Email before sending it.page

How can i show a preview of the Email being sent ?
kaustav goswamikaustav goswami
You have to include a text area in your page.
<apex:inputTextArea value="{!..some variable in controller}" />

In your controller you need to fetch the email template body

Query ---Select Id, Description, Name, IsActive,body,Folder.Name, subject,HtmlValue From EmailTemplate Where name =: Selected Template Name

Then assign the value of the body field to the variable used in the inputTextArea
Maryem Bourhi 16Maryem Bourhi 16
Hi, im doing the same thing, but in my email template i have some field ({!account.name}) how can i show the values of those fields ?