title: Custom VF Email Template is not recognizing my custom visualforce component as global
body: <p>Hi All and thank you for taking the time to look at my question!</p>
  
  <p>I created a custom vf component to query some information and send an email to a lead. Here is the component tag:</p>
  
  <pre><code>   &lt;apex:component access="global"  controller="My_Component_Name"&gt;
  </code></pre>
  
  <p>Please note the attribute access="global".</p>
  
  <p>In my VF Email Template I include the component as follows:</p>
  
  <pre><code>&lt;c:My_Component_Name cust_field="{!relatedTo.Custom_Field__c}"&gt;
  &lt;/c:My_Component_Name&gt;
  </code></pre>
  
  <p>However, when I try to include this component in a VF Email Template, I get the following error: </p>
  
  <pre><code>Error: &lt;messaging:emailTemplate&gt; can only contain components with an access
   level of global. &lt;c:my_component_name&gt; is not valid.   
  </code></pre>
  
  <p>I tried waiting, in case there was a time lag, I tried deleting the content and resaving, I even tried cloning the component and including the cloned version. Nothing helps.</p>
  
  <p>Does anyone have any ideas what I can do?</p>
  
  <p>*I changed the names of the components and fields, so please don't comment on possible typos in the names.</p>