I have a requirement where i have to use Visual force Email template.so, i have created a vf email template.Now i want to get that vf email body in apex controller.i now if i use custom HTML template i can get body.but my requirement is VF email template.
EmailTemplate template = [Select id,HtmlValue,Body from EmailTemplate where name =:'testEmail' limit 1];
system.debug('##template##'+template);
string hbody=template.HtmlValue;
system.debug('##hbody##'+hbody);
Result
EmailTemplate:{Id=00Xf0000000M7mQEAS, HtmlValue=null, Body=null}
hbody null
Here am getting null
values. Can any one please help me on this?