In your component you need to use the variable you are not using it. Also I suggest you as better practice use Proper name for controller and follow proper naming conventions. <apex:component controller="getSiteURL" access="global"> {!SiteURL} </apex:component>


This is expected behavior, though not clearly documented anywhere I can tell, as a literal cannot be modified, and so acts as a one-way data binding. If you need a "working copy", you'd want to write a setter method: String descriptionFormatInternal, descriptionFormatOld; public void setdescriptionFormat(String value) { if(value != ...


You can use custom Visualforce Components and then use it inside your Visualforce Email Template. I used similar thing in one of the projects, and it works. Salesforce References: VF Email Template Custom Controllers and Components with VF Email Templates

Only top voted, non community-wiki answers of a minimum length are eligible