2

I have created a VisualForce template. I need to use its advanced wiring facilities so can't use other template types.

I am trying to have some HTML in this template but not having much luck.

I add:

<HTML>
<BODY>
<I>This should be in italic</I>
</BODY>
</HTML>

to the template but it comes out verbatim as:

<HTML>
<BODY>
<I>This should be in italic</I>
</BODY>
</HTML>

Any ideas how I can add HTML to a visual force template?

3
  • Have you pasted it to <messaging:htmlEmailBody > or <messaging:plainTextEmailBody>?
    – eyescream
    Commented Nov 21, 2012 at 9:48
  • You just beat me to it. Yes that works. If you want to put that in as an answer, I'll accept it and delete my own.
    – dublintech
    Commented Nov 21, 2012 at 9:57
  • 1
    That's fine, accept your own answer ;) I'm not THAT greedy for the rep. points and after all it means you did your own research.
    – eyescream
    Commented Nov 21, 2012 at 10:06

1 Answer 1

3
<messaging:emailTemplate subject="Sample Disbursement Receipt" recipientType="User"  relatedToType="Call__c">
 <messaging:htmlEmailBody >
 <html>
<body>
Please find your sample drop receipt attached with this mail.
    </body>
    </html>
   </messaging:htmlEmailBody>
   </messaging:emailTemplate>

The sample Template that you can use .

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .