+ Start a Discussion
PS81PS81 

Visualforce Email template : Image broken in preview

Hi

I have updated a logo into the document folder and referencing with the below set of code in the visualforce template:
 
<body bgcolor="#00A1C1">
        <div>
        <div id ="header">
        <img src="NEC_Logo"></img>
        </div>
        <div id ="body">
         Dear {!recipient.name}
        
         <br></br> 
         <br>
             Notification that "{!relatedTo.Name}" is due to start today.
         </br>
         </div>
         </div>
        </body>
    </html>
</messaging:htmlEmailBody>
</messaging:emailTemplate>

But when i save and view in preview i see as below:

Logo not seen

Not clear enough on what is the issue. any inputs on this please?
Andy BoettcherAndy Boettcher
<img src="NEC_Logo"></img> is not any kind of valid URL/tag whatsoever.  If you are attempting to reference a static resource, you'll want to do this:
 
<apex:image url="{!$Resource.TestImage}"/>

Source:  Apex Documentation - https://developer.salesforce.com/docs/atlas.en-us.pages.meta/pages/pages_resources_reference.htm