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?

  • Have you pasted it to <messaging:htmlEmailBody > or <messaging:plainTextEmailBody>? – eyescream Nov 21 '12 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 Nov 21 '12 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 Nov 21 '12 at 10:06
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 .

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.